mirror of
https://github.com/GearsProgress/Poke_Transporter_GB.git
synced 2026-08-23 09:14:24 -05:00
Create vertical_menu widget
This commit implements a vertical menu widget, which should be quite a bit more flexible than what we currently have. It defines interfaces in order to respond to selection changes, show and hide. And has a i_item_widget interface class to allow you to use custom item widgets. This is done in preparation for adding a debug menu, in which I kinda want to add toggle options while using the same vertical_menu widget. Right now, vertical_menu is only used in Select_Menu. Needless to say that Select_Menu was reworked quite a bit. Still, in terms of visuals or functionality, the changes should be invisible for now. I mean, I didn't do anything *new* with it yet.
This commit is contained in:
@@ -682,6 +682,8 @@ const script_obj_params event_script_params[SCRIPT_SIZE] = {
|
||||
|
||||
void populate_lang_menu()
|
||||
{
|
||||
langs.clear_options();
|
||||
|
||||
langs.add_option(GENERAL_option_english, ENG_ID);
|
||||
langs.add_option(GENERAL_option_japanese, JPN_ID);
|
||||
langs.add_option(GENERAL_option_spanish, SPA_ID);
|
||||
@@ -696,6 +698,8 @@ void populate_lang_menu()
|
||||
|
||||
void populate_game_menu(int lang)
|
||||
{
|
||||
games.clear_options();
|
||||
|
||||
switch (lang)
|
||||
{
|
||||
case (JPN_ID):
|
||||
@@ -856,7 +860,6 @@ bool run_conditional(int index)
|
||||
games.set_lang(static_cast<u8>(lang));
|
||||
party_data.set_lang(static_cast<u8>(lang));
|
||||
return true;
|
||||
|
||||
case CMD_GAME_MENU:
|
||||
populate_game_menu(party_data.get_lang());
|
||||
game = games.select_menu_main();
|
||||
@@ -866,7 +869,6 @@ bool run_conditional(int index)
|
||||
}
|
||||
party_data.set_game(game);
|
||||
return true;
|
||||
|
||||
case CMD_SLIDE_PROF_LEFT:
|
||||
for (int i = 0; i <= (8 * 7); i += 2)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user