MCPcopy Create free account
hub / github.com/Project-LemonLime/Project_LemonLime / setTextAndColor

Method setTextAndColor

src/base/settings.cpp:281–369  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

279void Settings::setSplashTime(int x) { splashTime = x; }
280
281void Settings::setTextAndColor(ResultState result, QString &text, QString &frColor, QString &bgColor) {
282 text = "";
283 bgColor = "rgb(255, 255, 255)";
284 frColor = "rgb(0, 0, 0)";
285
286 switch (result) {
287 case CorrectAnswer:
288 text = tr("Correct Answer");
289 bgColor = "rgb(192, 255, 192)";
290 break;
291
292 case WrongAnswer:
293 text = tr("Wrong Answer");
294 bgColor = "rgb(255, 192, 192)";
295 break;
296
297 case PartlyCorrect:
298 text = tr("Partly Correct");
299 bgColor = "rgb(192, 255, 255)";
300 break;
301
302 case PresentationError:
303 text = tr("Presentation Error");
304 bgColor = "rgb(255, 216, 192)";
305 break;
306
307 case TimeLimitExceeded:
308 text = tr("Time Limit Exceeded");
309 bgColor = "rgb(255, 255, 192)";
310 break;
311
312 case MemoryLimitExceeded:
313 text = tr("Memory Limit Exceeded");
314 bgColor = "rgb(192, 192, 255)";
315 break;
316
317 case OutputLimitExceeded:
318 text = tr("Output Limit Exceeded");
319 bgColor = "rgb(216, 192, 255)";
320 break;
321
322 case CannotStartProgram:
323 text = tr("Cannot Start Program");
324 frColor = "rgb(255, 64, 64)";
325 bgColor = "rgb(192, 192, 192)";
326 break;
327
328 case FileError:
329 text = tr("File Error");
330 frColor = "rgb(255, 255, 64)";
331 bgColor = "rgb(192, 192, 192)";
332 break;
333
334 case RunTimeError:
335 text = tr("Run Time Error");
336 bgColor = "rgb(255, 192, 255)";
337 break;
338

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected