diff --git a/Adventures in Lestoria/MenuType.h b/Adventures in Lestoria/MenuType.h index 106bc9a8..c307c6b0 100644 --- a/Adventures in Lestoria/MenuType.h +++ b/Adventures in Lestoria/MenuType.h @@ -49,7 +49,7 @@ enum MenuType{ OVERWORLD_LEVEL_SELECT, //100% Controller Compatibility - Scrolling for keyboard? ITEM_LOADOUT, //100% Controller Compatibility LEVEL_COMPLETE, //100% Controller Compatibility - OVERWORLD_MENU, //0% Controller Compatibility + OVERWORLD_MENU, //100% Controller Compatibility CHARACTER_MENU, //0% Controller Compatibility INVENTORY, //0% Controller Compatibility MERCHANT, //0% Controller Compatibility diff --git a/Adventures in Lestoria/OverworldMapLevelWindow.cpp b/Adventures in Lestoria/OverworldMapLevelWindow.cpp index 538b0876..911af849 100644 --- a/Adventures in Lestoria/OverworldMapLevelWindow.cpp +++ b/Adventures in Lestoria/OverworldMapLevelWindow.cpp @@ -67,7 +67,9 @@ void Menu::InitializeOverworldMapLevelWindow(){ levelSelectWindow->SetupKeyboardNavigation( [](MenuType type,Data&returnData){ /*On Open*/}, { //Button Key - {{game->KEY_MENU},{"Game Menu",[](MenuType type){}}}, + {{game->KEY_MENU},{"Game Menu",[](MenuType type){ + Menu::OpenMenu(OVERWORLD_MENU); + }}}, {{game->KEY_CONFIRM},{"Start Stage",[](MenuType type){ Component(type,"Enter Button")->Click(); }}}, diff --git a/Adventures in Lestoria/OverworldMenuWindow.cpp b/Adventures in Lestoria/OverworldMenuWindow.cpp index ae15bc22..50447ce1 100644 --- a/Adventures in Lestoria/OverworldMenuWindow.cpp +++ b/Adventures in Lestoria/OverworldMenuWindow.cpp @@ -63,4 +63,35 @@ void Menu::InitializeOverworldMenuWindow(){ game->ResetGame(); return true; })END; + + overworldMenuWindow->SetupKeyboardNavigation( + [](MenuType type,Data&returnData){ //On Open + returnData="Resume Button"; + }, + { //Button Key + {game->KEY_BACK,{"Close Menu",[](MenuType type){ + Menu::CloseMenu(); + }}}, + {game->KEY_MENU,{"Close Menu",[](MenuType type){ + Menu::CloseMenu(); + }}}, + {game->KEY_CONFIRM,{"Select",[](MenuType type){}}}, + } + ,{ //Button Navigation Rules + {"Resume Button",{ + .up="Quit Button", + .down="Character Button",}}, + {"Character Button",{ + .up="Resume Button", + .down="Inventory Button",}}, + {"Inventory Button",{ + .up="Character Button", + .down="Settings Button",}}, + {"Settings Button",{ + .up="Inventory Button", + .down="Quit Button",}}, + {"Quit Button",{ + .up="Settings Button", + .down="Resume Button",}}, + }); } \ No newline at end of file diff --git a/Adventures in Lestoria/State_OverworldMap.cpp b/Adventures in Lestoria/State_OverworldMap.cpp index 55bfdaac..8a8fbf1b 100644 --- a/Adventures in Lestoria/State_OverworldMap.cpp +++ b/Adventures in Lestoria/State_OverworldMap.cpp @@ -97,10 +97,6 @@ void State_OverworldMap::OnUserUpdate(AiL*game){ } } - if(Menu::stack.size()==1&&AiL::KEY_MENU.Pressed()){ - Menu::OpenMenu(OVERWORLD_MENU); - } - #pragma region Handle Connection Point Clicking and Movement for(ConnectionPoint&cp:connections){ if(game->GetMouse(Mouse::LEFT).bPressed&&geom2d::overlaps(game->GetWorldMousePos(),cp.rect) diff --git a/Adventures in Lestoria/Version.h b/Adventures in Lestoria/Version.h index 46946637..a346f4f7 100644 --- a/Adventures in Lestoria/Version.h +++ b/Adventures in Lestoria/Version.h @@ -39,7 +39,7 @@ All rights reserved. #define VERSION_MAJOR 0 #define VERSION_MINOR 3 #define VERSION_PATCH 0 -#define VERSION_BUILD 7114 +#define VERSION_BUILD 7118 #define stringify(a) stringify_(a) #define stringify_(a) #a diff --git a/x64/Release/Adventures in Lestoria.exe b/x64/Release/Adventures in Lestoria.exe index 1673b093..8ef62935 100644 Binary files a/x64/Release/Adventures in Lestoria.exe and b/x64/Release/Adventures in Lestoria.exe differ