|
|
@ -156,7 +156,7 @@ void Menu::HoverMenuSelect(Crawler*game){ |
|
|
|
|
|
|
|
|
|
|
|
void Menu::MenuSelect(Crawler*game){ |
|
|
|
void Menu::MenuSelect(Crawler*game){ |
|
|
|
if(selection==vi2d{-1,-1}||buttons[selection.y][selection.x]->disabled)return; |
|
|
|
if(selection==vi2d{-1,-1}||buttons[selection.y][selection.x]->disabled)return; |
|
|
|
buttons[selection.y][selection.x]->onClick(MenuFuncData{*this,game,buttons[selection.y][selection.x]}); |
|
|
|
buttons[selection.y][selection.x]->onClick(MenuFuncData{*this,game,buttons[selection.y][selection.x]}); |
|
|
|
if(buttons[selection.y][selection.x]->menuDest!=MenuType::ENUM_END){ |
|
|
|
if(buttons[selection.y][selection.x]->menuDest!=MenuType::ENUM_END){ |
|
|
|
if(stack.size()<32){ |
|
|
|
if(stack.size()<32){ |
|
|
|
stack.push_back(menus[buttons[selection.y][selection.x]->menuDest]);//Navigate to the next menu.
|
|
|
|
stack.push_back(menus[buttons[selection.y][selection.x]->menuDest]);//Navigate to the next menu.
|
|
|
@ -640,3 +640,11 @@ void Menu::CloseMenu(){ |
|
|
|
std::pair<MenuType,std::string>Menu::GetMemoryLeakReportInfo(){ |
|
|
|
std::pair<MenuType,std::string>Menu::GetMemoryLeakReportInfo(){ |
|
|
|
return {lastMenuTypeCreated,lastRegisteredComponent}; |
|
|
|
return {lastMenuTypeCreated,lastRegisteredComponent}; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void Menu::CloseAllMenus(){ |
|
|
|
|
|
|
|
if(stack.size()<=0){ |
|
|
|
|
|
|
|
std::cout<<"WARNING! Trying to close out no menu?? Why are we doing this?"<<std::endl; |
|
|
|
|
|
|
|
throw; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
stack.clear(); |
|
|
|
|
|
|
|
} |