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.
30 lines
766 B
30 lines
766 B
#pragma once
|
|
#include "MenuButton.h"
|
|
#include "olcPixelGameEngine.h"
|
|
#include <stack>
|
|
|
|
class Crawler;
|
|
|
|
class Menu{
|
|
friend class Crawler;
|
|
friend class Player;
|
|
static bool MOUSE_NAVIGATION;
|
|
static std::map<MenuType,Menu>menus;
|
|
std::vector<MenuButton>buttons;
|
|
int selection=-1;
|
|
vf2d size; //Size in tiles (24x24), every menu will be tile-based
|
|
public:
|
|
Menu();
|
|
Menu(vf2d size);
|
|
void AddButton(const MenuButton&button);
|
|
void Update(Crawler*game);
|
|
void Draw(Crawler*game);
|
|
static void InitializeMenus();
|
|
static void OpenMenu(MenuType menu);
|
|
static std::vector<Menu*>stack;
|
|
private:
|
|
void MenuSelect(Crawler*game);
|
|
static const Menu InitializeTestMenu();
|
|
static const Menu InitializeTestSubMenu();
|
|
};
|
|
|
|
|