You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// A switch-case function for the MessageBox command (icon).
159
+
intMessageBoxIconSwitch(std::string sIconName) {
160
+
// Make argument lowercase
161
+
for (int i = 0; i < sIconName.length(); i++) {
162
+
sIconName[i] = std::tolower(sIconName[i]);
163
+
}
164
+
165
+
if (sIconName == "error") {
166
+
return16;
167
+
}
168
+
elseif (sIconName == "question") {
169
+
return32;
170
+
}
171
+
elseif (sIconName == "warning") {
172
+
return48;
173
+
}
174
+
elseif (sIconName == "info") {
175
+
return64;
176
+
}
177
+
else {
178
+
colour(RED, sColourGlobalBack);
179
+
std::cerr << wordWrap("ERROR - The specified icon argument seems to be incorrect.\nPlease add one from the list of icon options.\nSee 'messagebox -h' for more info.\n");
180
+
colour(sColourGlobal, sColourGlobalBack);
181
+
return1;
182
+
}
183
+
184
+
return1;
185
+
}
186
+
187
+
// A switch-case function for the MessageBox command (buttons)
std::cerr << wordWrap("ERROR - Your button argument seems to be incorrect.\nPlease make sure it is from the list of button options.\nSee 'messagebox -h' for more info. Using default option...\n");
218
+
colour(sColourGlobal, sColourGlobalBack);
219
+
220
+
return0;
221
+
}
222
+
223
+
return0;
224
+
}
225
+
226
+
/* MessageBox Codes */
227
+
//////////////////////
228
+
/* Message box codes are the following for icons:
229
+
[16] Error
230
+
[32] Question Mark
231
+
[48] Exclamation Mark
232
+
[64] Information 'I'
233
+
*/
234
+
/* Message box codes are the following for buttons:
0 commit comments