Fully implemented controller/keyboard controls for Inventory Consumable Window. Fix bug with loadout items that were set during file loads were not selected in consumable window. Release Build 6907.

This commit is contained in:
2024-02-09 02:53:55 -06:00
parent 13a821c011
commit fd1f762e20
13 changed files with 180 additions and 93 deletions
+3 -3
View File
@@ -76,7 +76,6 @@ Menu::Menu(vf2d pos,vf2d size)
}
void Menu::InitializeMenus(){
#define MAX_MENUS 32
stack.reserve(MAX_MENUS);
InitializeConsumableInventoryWindow();
InitializeClassSelectionWindow();
@@ -102,6 +101,7 @@ void Menu::InitializeMenus(){
InitializeShermanWindow();
InitializeKeyboardInputWindow();
InitializeNewKeybindInputWindow();
InitializePauseWindow();
for(MenuType type=MenuType(int(MenuType::ENUM_START)+1);type<MenuType::ENUM_END;type=MenuType(int(type+1))){
if(menus.count(type)==0){
@@ -150,8 +150,8 @@ void Menu::MenuSelect(AiL*game){
bool buttonStillValid=selection.lock()->onClick(MenuFuncData{*this,game,selection,dynamic_pointer_cast<ScrollableWindowComponent>(selection.lock()->parentComponent.lock())});
if(buttonStillValid){
if(selection.lock()->menuDest!=MenuType::ENUM_END){
if(stack.size()<32){
stack.push_back(menus[selection.lock()->menuDest]);//Navigate to the next menu.
if(stack.size()<MAX_MENUS){
Menu::OpenMenu(selection.lock()->menuDest); //Navigate to the next menu.
}else{
ERR("WARNING! Exceeded menu stack size limit!")
}