Credits navigation key actually pops up the credits for controllers.
This commit is contained in:
parent
78cbad9297
commit
a506c47aea
@ -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…
x
Reference in New Issue
Block a user