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:
@@ -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!")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user