#include "Crawler.h" #include "Menu.h" const Menu Menu::InitializeTestMenu(){ Menu testMenu({24*8,24*6}); MenuFunc quitWindow=[](Menu&menu,Crawler*game){ menu.stack.clear(); }; testMenu.AddButton(MenuButton({{24*1,24*1},{24*2,24*1}},"Close",nullptr,quitWindow)); MenuFunc doNothing=[](Menu&menu,Crawler*game){}; testMenu.AddButton(MenuButton({{24*4,24*1},{24*3,24*1}},"Test",nullptr,doNothing)); MenuFunc HurtPlayer=[](Menu&menu,Crawler*game){ game->GetPlayer()->Hurt(20,game->GetPlayer()->OnUpperLevel(),game->GetPlayer()->GetZ()); }; testMenu.AddButton(MenuButton({{24*4,24*3},{24*3,24*1}},"Hurt Player",nullptr,HurtPlayer)); testMenu.AddButton(MenuButton({{24*2,24*4.5},{24*4,24*1}},"Open Another\n Menu",TEST_2,nullptr,doNothing)); return testMenu; }