mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-09 21:11:50 +00:00
Menu screen prototype, refactor
This commit is contained in:
parent
5af04e20d1
commit
b03bcb5191
14 changed files with 267 additions and 52 deletions
|
|
@ -1,6 +1,7 @@
|
|||
#ifndef FRONTEND_SCREENS_H_
|
||||
#define FRONTEND_SCREENS_H_
|
||||
|
||||
#include <memory>
|
||||
#include "../settings.h"
|
||||
|
||||
class Assets;
|
||||
|
|
@ -8,6 +9,11 @@ class Level;
|
|||
class WorldRenderer;
|
||||
class HudRenderer;
|
||||
class Engine;
|
||||
class Camera;
|
||||
|
||||
namespace gui {
|
||||
class UINode;
|
||||
}
|
||||
|
||||
|
||||
/* Screen is a mainloop state */
|
||||
|
|
@ -21,6 +27,16 @@ public:
|
|||
virtual void draw(float delta) = 0;
|
||||
};
|
||||
|
||||
class MenuScreen : public Screen {
|
||||
std::shared_ptr<gui::UINode> panel;
|
||||
public:
|
||||
MenuScreen(Engine* engine);
|
||||
~MenuScreen();
|
||||
|
||||
void update(float delta) override;
|
||||
void draw(float delta) override;
|
||||
};
|
||||
|
||||
class LevelScreen : public Screen {
|
||||
Level* level;
|
||||
WorldRenderer* worldRenderer;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue