parent
461265a8a4
commit
dd2ff24d85
@ -1,26 +1,26 @@ |
|||||||
#include "Crawler.h" |
#include "Crawler.h" |
||||||
#include "MenuComponent.h" |
#include "MenuComponent.h" |
||||||
|
|
||||||
const Menu Menu::InitializeTestMenu(){ |
Menu*Menu::InitializeTestMenu(){ |
||||||
Menu testMenu(CENTERED,{24*8,24*6}); |
Menu*testMenu=new Menu(CENTERED,{24*8,24*6}); |
||||||
|
|
||||||
MenuFunc quitWindow=[](MenuFuncData data){ |
MenuFunc quitWindow=[](MenuFuncData data){ |
||||||
data.menu.stack.clear(); |
data.menu.stack.clear(); |
||||||
}; |
}; |
||||||
|
|
||||||
testMenu.AddComponent("Close",new MenuComponent(TEST,{{24*1,24*1},{24*2,24*1}},"Close",quitWindow)); |
testMenu->AddComponent("Close",new MenuComponent(TEST,{{24*1,24*1},{24*2,24*1}},"Close",quitWindow)); |
||||||
|
|
||||||
MenuFunc doNothing=[](MenuFuncData data){}; |
MenuFunc doNothing=[](MenuFuncData data){}; |
||||||
|
|
||||||
testMenu.AddComponent("Test",new MenuComponent(TEST,{{24*4,24*1},{24*3,24*1}},"Test",doNothing)); |
testMenu->AddComponent("Test",new MenuComponent(TEST,{{24*4,24*1},{24*3,24*1}},"Test",doNothing)); |
||||||
|
|
||||||
MenuFunc HurtPlayer=[](MenuFuncData data){ |
MenuFunc HurtPlayer=[](MenuFuncData data){ |
||||||
data.game->GetPlayer()->Hurt(20,data.game->GetPlayer()->OnUpperLevel(),data.game->GetPlayer()->GetZ()); |
data.game->GetPlayer()->Hurt(20,data.game->GetPlayer()->OnUpperLevel(),data.game->GetPlayer()->GetZ()); |
||||||
}; |
}; |
||||||
|
|
||||||
testMenu.AddComponent("Hurt Player",new MenuComponent(TEST,{{24*4,24*3},{24*3,24*1}},"Hurt Player",HurtPlayer)); |
testMenu->AddComponent("Hurt Player",new MenuComponent(TEST,{{24*4,24*3},{24*3,24*1}},"Hurt Player",HurtPlayer)); |
||||||
|
|
||||||
testMenu.AddComponent("Open SubMenu",new MenuComponent(TEST,{{24*2,24*4.5},{24*4,24*1}},"Open Another\n Menu",TEST_2,doNothing)); |
testMenu->AddComponent("Open SubMenu",new MenuComponent(TEST,{{24*2,24*4.5},{24*4,24*1}},"Open Another\n Menu",TEST_2,doNothing)); |
||||||
|
|
||||||
return testMenu; |
return testMenu; |
||||||
} |
} |
Binary file not shown.
Loading…
Reference in new issue