The open source repository for the action RPG game in development by Sig Productions titled 'Adventures in Lestoria'! https://forums.lestoria.net
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
AdventuresInLestoria/Crawler/TestSubMenu.cpp

31 lines
741 B

#include "Crawler.h"
#include "Menu.h"
#include "DEFINES.h"
#include "olcPixelGameEngine.h"
#include "safemap.h"
INCLUDE_GFX
const Menu Menu::InitializeTestSubMenu(){
Menu testSubMenu({24*4,24*5});
MenuFunc goBack=MENUFUNC{
menu.stack.pop_back();
};
testSubMenu.AddComponent(new MenuComponent({{24*1,24*1},{24*2,24*1}},"Go Back",goBack));
MenuFunc quitWindow=MENUFUNC{
menu.stack.clear();
};
testSubMenu.AddComponent(new MenuComponent({{24*1,24*3},{24*3,24*1}},"Close Window",quitWindow));
MenuFunc restoreMana=MENUFUNC{
game->GetPlayer()->SetMana(game->GetPlayer()->GetMaxMana());
};
testSubMenu.AddComponent(new MenuIconButton({{24*0,24*3},{24*1,24*2}},GFX["mana.png"].Decal(),restoreMana));
return testSubMenu;
}