Implemented controller compatibility for Overworld Menu. Release Build 7118.

pull/35/head
sigonasr2 10 months ago
parent 2c76105ddf
commit c35f1509f4
  1. 2
      Adventures in Lestoria/MenuType.h
  2. 4
      Adventures in Lestoria/OverworldMapLevelWindow.cpp
  3. 31
      Adventures in Lestoria/OverworldMenuWindow.cpp
  4. 4
      Adventures in Lestoria/State_OverworldMap.cpp
  5. 2
      Adventures in Lestoria/Version.h
  6. BIN
      x64/Release/Adventures in Lestoria.exe

@ -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

@ -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<MenuComponent>(type,"Enter Button")->Click();
}}},

@ -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",}},
});
}

@ -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)

@ -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

Loading…
Cancel
Save