Credits navigation key actually pops up the credits for controllers.

mac-build
sigonasr2 9 months ago
parent af0a628866
commit ddddd966aa
  1. 3
      Adventures in Lestoria/AdventuresInLestoria.cpp
  2. 3
      Adventures in Lestoria/Key.cpp
  3. 4
      Adventures in Lestoria/MainMenuWindow.cpp
  4. 4
      Adventures in Lestoria/Menu.cpp
  5. 2
      Adventures in Lestoria/Menu.h

@ -3558,9 +3558,6 @@ void AiL::GetAnyKeyRelease(Key key){
if(InputGroup::menuNamesToInputGroups.count(Menu::menus[NEW_INPUT]->S(A::KEYBIND))){ if(InputGroup::menuNamesToInputGroups.count(Menu::menus[NEW_INPUT]->S(A::KEYBIND))){
InputGroup::menuNamesToInputGroups[Menu::menus[NEW_INPUT]->S(A::KEYBIND)]->SetNewPrimaryKeybind(Input{KEY,key}); InputGroup::menuNamesToInputGroups[Menu::menus[NEW_INPUT]->S(A::KEYBIND)]->SetNewPrimaryKeybind(Input{KEY,key});
Menu::alreadyClicked=true; Menu::alreadyClicked=true;
for(auto[menuType,menu]:Menu::menus){
menu->helpDisplay.Initialize(menu->inputGroups);
}
Menu::CloseMenu(); Menu::CloseMenu();
} }
}else{ }else{

@ -792,6 +792,9 @@ void InputGroup::AddPrimaryKeybind(Input key){
void InputGroup::SetNewPrimaryKeybind(Input key){ void InputGroup::SetNewPrimaryKeybind(Input key){
RemovePrimaryKeybind(key.GetType()); RemovePrimaryKeybind(key.GetType());
AddPrimaryKeybind(key); AddPrimaryKeybind(key);
for(auto[menuType,menu]:Menu::menus){
menu->ReInitializeInputGroup();
}
} }
void InputListener::Update(){ void InputListener::Update(){

@ -83,7 +83,9 @@ void Menu::InitializeMainMenuWindow(){
}, },
{ //Button Key { //Button Key
{game->KEY_CONFIRM,{"Select",[](MenuType type){}}}, {game->KEY_CONFIRM,{"Select",[](MenuType type){}}},
{game->KEY_SELECT,{"Credits",[](MenuType type){}}}, {game->KEY_MENU,{"Credits",[](MenuType type){
Component<FloatingMenuComponent>(type,"Credits Button")->Click();
}}},
} }
,{ //Button Navigation Rules ,{ //Button Navigation Rules
{"New Game Button",{ {"New Game Button",{

@ -786,3 +786,7 @@ bool Menu::IsCurrentlyActive(MenuType type){
if(Menu::stack.size()==0)return false; if(Menu::stack.size()==0)return false;
return Menu::stack.back()->GetType()==type; return Menu::stack.back()->GetType()==type;
} }
void Menu::ReInitializeInputGroup(){
helpDisplay.Initialize(inputGroups);
}

@ -189,6 +189,8 @@ public:
static std::pair<MenuType,std::string>GetMemoryLeakReportInfo(); static std::pair<MenuType,std::string>GetMemoryLeakReportInfo();
virtual void Cleanup(); virtual void Cleanup();
void ReInitializeInputGroup();
static void DrawThemedWindow(vf2d menuPos,vf2d size,Pixel renderColor=WHITE); static void DrawThemedWindow(vf2d menuPos,vf2d size,Pixel renderColor=WHITE);
//X (0-2), Y (0-2) for specific 9-patch tile (tiled version). //X (0-2), Y (0-2) for specific 9-patch tile (tiled version).

Loading…
Cancel
Save