@ -3558,9 +3558,6 @@ void AiL::GetAnyKeyRelease(Key key){
if(InputGroup::menuNamesToInputGroups.count(Menu::menus[NEW_INPUT]->S(A::KEYBIND))){
InputGroup::menuNamesToInputGroups[Menu::menus[NEW_INPUT]->S(A::KEYBIND)]->SetNewPrimaryKeybind(Input{KEY,key});
Menu::alreadyClicked=true;
for(auto[menuType,menu]:Menu::menus){
menu->helpDisplay.Initialize(menu->inputGroups);
}
Menu::CloseMenu();
}else{
@ -792,6 +792,9 @@ void InputGroup::AddPrimaryKeybind(Input key){
void InputGroup::SetNewPrimaryKeybind(Input key){
RemovePrimaryKeybind(key.GetType());
AddPrimaryKeybind(key);
menu->ReInitializeInputGroup();
void InputListener::Update(){
@ -83,7 +83,9 @@ void Menu::InitializeMainMenuWindow(){
},
{ //Button Key
{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
{"New Game Button",{
@ -785,4 +785,8 @@ void Menu::IgnoreNextMouseNavigationAttempt(){
bool Menu::IsCurrentlyActive(MenuType type){
if(Menu::stack.size()==0)return false;
return Menu::stack.back()->GetType()==type;
void Menu::ReInitializeInputGroup(){
helpDisplay.Initialize(inputGroups);
@ -189,6 +189,8 @@ public:
static std::pair<MenuType,std::string>GetMemoryLeakReportInfo();
virtual void Cleanup();
void ReInitializeInputGroup();
static void DrawThemedWindow(vf2d menuPos,vf2d size,Pixel renderColor=WHITE);
//X (0-2), Y (0-2) for specific 9-patch tile (tiled version).