diff options
Diffstat (limited to 'src/script_menu.c')
-rw-r--r-- | src/script_menu.c | 66 |
1 files changed, 33 insertions, 33 deletions
diff --git a/src/script_menu.c b/src/script_menu.c index f3317773a..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,34 +353,34 @@ static void CreatePCMultichoice(void) numChoices = 4; windowId = CreateWindowFromRect(0, 0, width, 8); SetStandardWindowBorderStyle(windowId, 0); - AddTextPrinterParameterized(windowId, 1, gText_HallOfFame, y, 33, TEXT_SPEED_FF, NULL); - AddTextPrinterParameterized(windowId, 1, 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, 1, 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, 1, gText_LanettesPC, y, 1, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(windowId, FONT_NORMAL, gText_LanettesPC, y, 1, TEXT_SKIP_DRAW, NULL); else - AddTextPrinterParameterized(windowId, 1, 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); - AddTextPrinterParameterized2(0, 1, gText_WhichPCShouldBeAccessed, 0, NULL, 2, 1, 3); + LoadMessageBoxAndFrameGfx(0, TRUE); + AddTextPrinterParameterized2(0, FONT_NORMAL, gText_WhichPCShouldBeAccessed, 0, NULL, 2, 1, 3); } bool8 ScriptMenu_CreateLilycoveSSTidalMultichoice(void) @@ -414,7 +414,7 @@ static void CreateLilycoveSSTidalMultichoice(void) sLilycoveSSTidalSelections[i] = 0xFF; } - GetFontAttribute(1, FONTATTR_MAX_LETTER_WIDTH); + GetFontAttribute(FONT_NORMAL, FONTATTR_MAX_LETTER_WIDTH); if (gSpecialVar_0x8004 == 0) { @@ -527,13 +527,13 @@ static void CreateLilycoveSSTidalMultichoice(void) { if (sLilycoveSSTidalSelections[i] != 0xFF) { - AddTextPrinterParameterized(windowId, 1, 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); } } @@ -645,27 +645,27 @@ static void DrawLinkServicesMultichoiceMenu(u8 multichoiceId) { case MULTI_WIRELESS_NO_BERRY: FillWindowPixelBuffer(0, PIXEL_FILL(1)); - AddTextPrinterParameterized2(0, 1, sWirelessOptionsNoBerryCrush[Menu_GetCursorPos()], 0, NULL, 2, 1, 3); + AddTextPrinterParameterized2(0, FONT_NORMAL, sWirelessOptionsNoBerryCrush[Menu_GetCursorPos()], 0, NULL, 2, 1, 3); break; case MULTI_CABLE_CLUB_WITH_RECORD_MIX: FillWindowPixelBuffer(0, PIXEL_FILL(1)); - AddTextPrinterParameterized2(0, 1, sCableClubOptions_WithRecordMix[Menu_GetCursorPos()], 0, NULL, 2, 1, 3); + AddTextPrinterParameterized2(0, FONT_NORMAL, sCableClubOptions_WithRecordMix[Menu_GetCursorPos()], 0, NULL, 2, 1, 3); break; case MULTI_WIRELESS_NO_RECORD: FillWindowPixelBuffer(0, PIXEL_FILL(1)); - AddTextPrinterParameterized2(0, 1, sWirelessOptions_NoRecordMix[Menu_GetCursorPos()], 0, NULL, 2, 1, 3); + AddTextPrinterParameterized2(0, FONT_NORMAL, sWirelessOptions_NoRecordMix[Menu_GetCursorPos()], 0, NULL, 2, 1, 3); break; case MULTI_WIRELESS_ALL_SERVICES: FillWindowPixelBuffer(0, PIXEL_FILL(1)); - AddTextPrinterParameterized2(0, 1, sWirelessOptions_AllServices[Menu_GetCursorPos()], 0, NULL, 2, 1, 3); + AddTextPrinterParameterized2(0, FONT_NORMAL, sWirelessOptions_AllServices[Menu_GetCursorPos()], 0, NULL, 2, 1, 3); break; case MULTI_WIRELESS_NO_RECORD_BERRY: FillWindowPixelBuffer(0, PIXEL_FILL(1)); - AddTextPrinterParameterized2(0, 1, sWirelessOptions_NoRecordMixBerryCrush[Menu_GetCursorPos()], 0, NULL, 2, 1, 3); + AddTextPrinterParameterized2(0, FONT_NORMAL, sWirelessOptions_NoRecordMixBerryCrush[Menu_GetCursorPos()], 0, NULL, 2, 1, 3); break; case MULTI_CABLE_CLUB_NO_RECORD_MIX: FillWindowPixelBuffer(0, PIXEL_FILL(1)); - AddTextPrinterParameterized2(0, 1, sCableClubOptions_NoRecordMix[Menu_GetCursorPos()], 0, NULL, 2, 1, 3); + AddTextPrinterParameterized2(0, FONT_NORMAL, sCableClubOptions_NoRecordMix[Menu_GetCursorPos()], 0, NULL, 2, 1, 3); break; } } @@ -688,17 +688,17 @@ static void CreateStartMenuForPokenavTutorial(void) { u8 windowId = CreateWindowFromRect(21, 0, 7, 18); SetStandardWindowBorderStyle(windowId, 0); - AddTextPrinterParameterized(windowId, 1, gText_MenuOptionPokedex, 8, 9, TEXT_SPEED_FF, NULL); - AddTextPrinterParameterized(windowId, 1, gText_MenuOptionPokemon, 8, 25, TEXT_SPEED_FF, NULL); - AddTextPrinterParameterized(windowId, 1, gText_MenuOptionBag, 8, 41, TEXT_SPEED_FF, NULL); - AddTextPrinterParameterized(windowId, 1, gText_MenuOptionPokenav, 8, 57, TEXT_SPEED_FF, NULL); - AddTextPrinterParameterized(windowId, 1, gSaveBlock2Ptr->playerName, 8, 73, TEXT_SPEED_FF, NULL); - AddTextPrinterParameterized(windowId, 1, gText_MenuOptionSave, 8, 89, TEXT_SPEED_FF, NULL); - AddTextPrinterParameterized(windowId, 1, gText_MenuOptionOption, 8, 105, TEXT_SPEED_FF, NULL); - AddTextPrinterParameterized(windowId, 1, gText_MenuOptionExit, 8, 121, TEXT_SPEED_FF, NULL); - sub_81983AC(windowId, 1, 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] @@ -727,7 +727,7 @@ static int DisplayTextAndGetWidthInternal(const u8 *str) { u8 temp[64]; StringExpandPlaceholders(temp, str); - return GetStringWidth(1, temp, 0); + return GetStringWidth(FONT_NORMAL, temp, 0); } int DisplayTextAndGetWidth(const u8 *str, int prevWidth) |