MCPcopy Create free account
hub / github.com/doldecomp/mkdd / draw

Method draw

src/Osako/MainMenuApp.cpp:484–647  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

482}
483
484void MainMenuApp::draw() {
485 const JUTColor highlightColor(0xff, 0xff, 0xff, 0xff);
486 const JUTColor gray(0x80, 0x80, 0x80, 0x80);
487 const char *dash = "-";
488 int x = 70;
489 J2DPrint *print = System::getJ2DPrint();
490
491 System::getJ2DOrtho()->setPort();
492 System::getJ2DPrint()->initiate();
493
494 print->setWhiteColor(highlightColor);
495 print->initiate();
496 print->print(80.0f, 80.0f, "Main Menu(kari)");
497
498 if (mCursorPos == 0) {
499 print->print(35.0f, 120.0f, dash);
500 }
501
502 u8 i;
503 for (i = 0; i < 3; i++) {
504 if (mDebugMode == i) {
505 print->setWhiteColor(highlightColor);
506 print->initiate();
507 }
508 else {
509 print->setWhiteColor(gray);
510 print->initiate();
511 }
512
513 print->print(x, 120.0f, scpaDebugMode[i]);
514 x += (int)print->getWidth(scpaDebugMode[i]);
515 x += 35;
516 }
517
518 x = 70;
519 switch(mDebugMode) {
520 case 0: {
521 print->setWhiteColor(highlightColor);
522 print->initiate();
523 if (mCursorPos == 1) {
524 print->print(35.0f, 145.0f, dash);
525 }
526
527 for (i = 1; i <= 8; i++) {
528 if (mPlayerCount == i) {
529 print->setWhiteColor(highlightColor);
530 print->initiate();
531 }
532 else {
533 print->setWhiteColor(gray);
534 print->initiate();
535 }
536
537 print->print(x, 145.0f, "%dP", i);
538 x += (int)print->getWidth("%dP", i);
539 x += 35;
540 }
541

Callers

nothing calls this directly

Calls 9

getJ2DPrintFunction · 0.85
getJ2DOrthoFunction · 0.85
setWhiteColorMethod · 0.80
isGameUnlockedMethod · 0.80
isKartUnlockedMethod · 0.80
setPortMethod · 0.45
initiateMethod · 0.45
printMethod · 0.45
getWidthMethod · 0.45

Tested by

no test coverage detected