parent
e846c61c53
commit
3cbb0d1e17
@ -0,0 +1,18 @@ |
||||
#pragma once |
||||
#include "MenuButton.h" |
||||
#include "olcPixelGameEngine.h" |
||||
#include <stack> |
||||
|
||||
class Crawler; |
||||
|
||||
class Menu{ |
||||
std::stack<Menu*>*stack=nullptr; |
||||
std::vector<MenuButton>buttons; |
||||
vf2d size; //Size in tiles (24x24), every menu will be tile-based
|
||||
|
||||
Menu(); |
||||
void AddButton(vf2d pos); |
||||
void Update(float fElapsedTime); |
||||
void Draw(Crawler*game); |
||||
}; |
||||
|
@ -0,0 +1,17 @@ |
||||
#pragma once |
||||
#include "olcPixelGameEngine.h" |
||||
#include <functional> |
||||
|
||||
class Menu; |
||||
class Crawler; |
||||
|
||||
class MenuButton{ |
||||
Menu*menuDest; |
||||
vf2d size; |
||||
std::string label; |
||||
Decal*icon; |
||||
std::function<void()>onClick; |
||||
|
||||
void Update(float fElapsedTime); |
||||
void Draw(Crawler*game); |
||||
}; |
After Width: | Height: | Size: 2.1 KiB |
Loading…
Reference in new issue