diff options
author | GriffinR <griffin.g.richards@gmail.com> | 2021-11-13 23:26:46 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-13 23:26:46 -0500 |
commit | f42eafc85b007cd27e90bc9a1350d589e31bda43 (patch) | |
tree | 7a09999f6ac2fc2d1b36ece5ec484ec6527a201f /src/script_menu.c | |
parent | 4c4fa1f25e55e41f469604a984a820f5a7f30e90 (diff) | |
parent | 8d18d03c791c40bad532c62f217b0f82aadec6d2 (diff) |
Merge branch 'master' into doc-banim
Diffstat (limited to 'src/script_menu.c')
-rw-r--r-- | src/script_menu.c | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/src/script_menu.c b/src/script_menu.c index f0dccd9f9..ae0fe91e6 100644 --- a/src/script_menu.c +++ b/src/script_menu.c @@ -109,7 +109,7 @@ static void DrawMultichoiceMenu(u8 left, u8 top, u8 multichoiceId, bool8 ignoreB windowId = CreateWindowFromRect(left, top, newWidth, count * 2); SetStandardWindowBorderStyle(windowId, 0); PrintMenuTable(windowId, count, actions); - InitMenuInUpperLeftCornerPlaySoundWhenAPressed(windowId, count, cursorPos); + InitMenuInUpperLeftCornerNormal(windowId, count, cursorPos); ScheduleBgCopyTilemapToVram(0); InitMultichoiceCheckWrap(ignoreBPress, count, windowId, multichoiceId); } @@ -280,7 +280,7 @@ bool8 ScriptMenu_MultichoiceGrid(u8 left, u8 top, u8 multichoiceId, bool8 ignore SetStandardWindowBorderStyle(gTasks[taskId].tWindowId, 0); PrintMenuGridTable(gTasks[taskId].tWindowId, newWidth * 8, columnCount, rowCount, sMultichoiceLists[multichoiceId].list); InitMenuActionGrid(gTasks[taskId].tWindowId, newWidth * 8, columnCount, rowCount, 0); - CopyWindowToVram(gTasks[taskId].tWindowId, 3); + CopyWindowToVram(gTasks[taskId].tWindowId, COPYWIN_FULL); return TRUE; } } @@ -288,7 +288,7 @@ bool8 ScriptMenu_MultichoiceGrid(u8 left, u8 top, u8 multichoiceId, bool8 ignore static void Task_HandleMultichoiceGridInput(u8 taskId) { s16 *data = gTasks[taskId].data; - s8 selection = Menu_ProcessInputGridLayout(); + s8 selection = Menu_ProcessGridInput(); switch (selection) { @@ -353,33 +353,33 @@ static void CreatePCMultichoice(void) numChoices = 4; windowId = CreateWindowFromRect(0, 0, width, 8); SetStandardWindowBorderStyle(windowId, 0); - AddTextPrinterParameterized(windowId, FONT_NORMAL, gText_HallOfFame, y, 33, TEXT_SPEED_FF, NULL); - AddTextPrinterParameterized(windowId, FONT_NORMAL, gText_LogOff, y, 49, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(windowId, FONT_NORMAL, gText_HallOfFame, y, 33, TEXT_SKIP_DRAW, NULL); + AddTextPrinterParameterized(windowId, FONT_NORMAL, gText_LogOff, y, 49, TEXT_SKIP_DRAW, NULL); } else { numChoices = 3; windowId = CreateWindowFromRect(0, 0, width, 6); SetStandardWindowBorderStyle(windowId, 0); - AddTextPrinterParameterized(windowId, FONT_NORMAL, gText_LogOff, y, 33, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(windowId, FONT_NORMAL, gText_LogOff, y, 33, TEXT_SKIP_DRAW, NULL); } // Change PC name if player has met Lanette if (FlagGet(FLAG_SYS_PC_LANETTE)) - AddTextPrinterParameterized(windowId, FONT_NORMAL, gText_LanettesPC, y, 1, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(windowId, FONT_NORMAL, gText_LanettesPC, y, 1, TEXT_SKIP_DRAW, NULL); else - AddTextPrinterParameterized(windowId, FONT_NORMAL, gText_SomeonesPC, y, 1, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(windowId, FONT_NORMAL, gText_SomeonesPC, y, 1, TEXT_SKIP_DRAW, NULL); StringExpandPlaceholders(gStringVar4, gText_PlayersPC); PrintPlayerNameOnWindow(windowId, gStringVar4, y, 17); - InitMenuInUpperLeftCornerPlaySoundWhenAPressed(windowId, numChoices, 0); - CopyWindowToVram(windowId, 3); + InitMenuInUpperLeftCornerNormal(windowId, numChoices, 0); + CopyWindowToVram(windowId, COPYWIN_FULL); InitMultichoiceCheckWrap(FALSE, numChoices, windowId, MULTI_PC); } void ScriptMenu_DisplayPCStartupPrompt(void) { - sub_819786C(0, TRUE); + LoadMessageBoxAndFrameGfx(0, TRUE); AddTextPrinterParameterized2(0, FONT_NORMAL, gText_WhichPCShouldBeAccessed, 0, NULL, 2, 1, 3); } @@ -527,13 +527,13 @@ static void CreateLilycoveSSTidalMultichoice(void) { if (sLilycoveSSTidalSelections[i] != 0xFF) { - AddTextPrinterParameterized(windowId, FONT_NORMAL, sLilycoveSSTidalDestinations[sLilycoveSSTidalSelections[i]], 8, selectionCount * 16 + 1, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(windowId, FONT_NORMAL, sLilycoveSSTidalDestinations[sLilycoveSSTidalSelections[i]], 8, selectionCount * 16 + 1, TEXT_SKIP_DRAW, NULL); selectionCount++; } } - InitMenuInUpperLeftCornerPlaySoundWhenAPressed(windowId, count, count - 1); - CopyWindowToVram(windowId, 3); + InitMenuInUpperLeftCornerNormal(windowId, count, count - 1); + CopyWindowToVram(windowId, COPYWIN_FULL); InitMultichoiceCheckWrap(FALSE, count, windowId, MULTI_SSTIDAL_LILYCOVE); } } @@ -688,17 +688,17 @@ static void CreateStartMenuForPokenavTutorial(void) { u8 windowId = CreateWindowFromRect(21, 0, 7, 18); SetStandardWindowBorderStyle(windowId, 0); - AddTextPrinterParameterized(windowId, FONT_NORMAL, gText_MenuOptionPokedex, 8, 9, TEXT_SPEED_FF, NULL); - AddTextPrinterParameterized(windowId, FONT_NORMAL, gText_MenuOptionPokemon, 8, 25, TEXT_SPEED_FF, NULL); - AddTextPrinterParameterized(windowId, FONT_NORMAL, gText_MenuOptionBag, 8, 41, TEXT_SPEED_FF, NULL); - AddTextPrinterParameterized(windowId, FONT_NORMAL, gText_MenuOptionPokenav, 8, 57, TEXT_SPEED_FF, NULL); - AddTextPrinterParameterized(windowId, FONT_NORMAL, gSaveBlock2Ptr->playerName, 8, 73, TEXT_SPEED_FF, NULL); - AddTextPrinterParameterized(windowId, FONT_NORMAL, gText_MenuOptionSave, 8, 89, TEXT_SPEED_FF, NULL); - AddTextPrinterParameterized(windowId, FONT_NORMAL, gText_MenuOptionOption, 8, 105, TEXT_SPEED_FF, NULL); - AddTextPrinterParameterized(windowId, FONT_NORMAL, gText_MenuOptionExit, 8, 121, TEXT_SPEED_FF, NULL); - sub_81983AC(windowId, FONT_NORMAL, 0, 9, 16, ARRAY_COUNT(MultichoiceList_ForcedStartMenu), 0); + AddTextPrinterParameterized(windowId, FONT_NORMAL, gText_MenuOptionPokedex, 8, 9, TEXT_SKIP_DRAW, NULL); + AddTextPrinterParameterized(windowId, FONT_NORMAL, gText_MenuOptionPokemon, 8, 25, TEXT_SKIP_DRAW, NULL); + AddTextPrinterParameterized(windowId, FONT_NORMAL, gText_MenuOptionBag, 8, 41, TEXT_SKIP_DRAW, NULL); + AddTextPrinterParameterized(windowId, FONT_NORMAL, gText_MenuOptionPokenav, 8, 57, TEXT_SKIP_DRAW, NULL); + AddTextPrinterParameterized(windowId, FONT_NORMAL, gSaveBlock2Ptr->playerName, 8, 73, TEXT_SKIP_DRAW, NULL); + AddTextPrinterParameterized(windowId, FONT_NORMAL, gText_MenuOptionSave, 8, 89, TEXT_SKIP_DRAW, NULL); + AddTextPrinterParameterized(windowId, FONT_NORMAL, gText_MenuOptionOption, 8, 105, TEXT_SKIP_DRAW, NULL); + AddTextPrinterParameterized(windowId, FONT_NORMAL, gText_MenuOptionExit, 8, 121, TEXT_SKIP_DRAW, NULL); + InitMenuNormal(windowId, FONT_NORMAL, 0, 9, 16, ARRAY_COUNT(MultichoiceList_ForcedStartMenu), 0); InitMultichoiceNoWrap(FALSE, ARRAY_COUNT(MultichoiceList_ForcedStartMenu), windowId, MULTI_FORCED_START_MENU); - CopyWindowToVram(windowId, 3); + CopyWindowToVram(windowId, COPYWIN_FULL); } #define tWindowId data[6] |