Implemented overworld gamepad control functions. Added ability to have certain inputer helper labels to be hidden away. When click functions are called on MenuComponents, it should also apply the menu navigation rules of the button.

This commit is contained in:
2024-01-20 14:42:35 -06:00
parent 7cd3600f42
commit 4eec0ce337
10 changed files with 112 additions and 79 deletions
+11 -1
View File
@@ -246,5 +246,15 @@ void MenuComponent::OnPlayerMoneyUpdate(uint32_t newMoney){}
void MenuComponent::OnChapterUpdate(uint8_t newChapter){}
void MenuComponent::Click(){
onClick(MenuFuncData{*Menu::menus[parentMenu],game,Menu::menus[parentMenu]->components[name]});
bool buttonStillValid=onClick(MenuFuncData{*Menu::menus[parentMenu],game,Menu::menus[parentMenu]->components[name]});
if(buttonStillValid){
if(menuDest!=MenuType::ENUM_END){
if(Menu::stack.size()<32){
Menu::stack.push_back(Menu::menus[menuDest]);//Navigate to the next menu.
}else{
ERR("WARNING! Exceeded menu stack size limit!")
}
}
}
}