summaryrefslogtreecommitdiff
path: root/src/script_menu.c
diff options
context:
space:
mode:
authorGriffinR <griffin.g.richards@gmail.com>2021-11-08 21:23:21 -0500
committerGitHub <noreply@github.com>2021-11-08 21:23:21 -0500
commit1c82571fa04ecad7d4a805e5fbec4691643ac655 (patch)
tree394ee77362fdda45e808e3362c473d4cfb653dcc /src/script_menu.c
parent737a5cba552275b43a89d59d6c5595ce4af25146 (diff)
parentc6b83bbb215ad25f533346873286f103c582d906 (diff)
Merge pull request #1542 from GriffinRichards/doc-menu
Document menu
Diffstat (limited to 'src/script_menu.c')
-rw-r--r--src/script_menu.c48
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]