First step in refactoring to allow for multiple levels. Next is to clean up the APIs and sort out how things will be notified that they have to switch levels.
This commit is contained in:
parent
3344181a47
commit
c14efee9ea
9 changed files with 100 additions and 96 deletions
9
gui.hpp
9
gui.hpp
|
@ -19,6 +19,7 @@
|
|||
#include "render.hpp"
|
||||
#include "panel.hpp"
|
||||
#include "lights.hpp"
|
||||
#include "levelmanager.hpp"
|
||||
|
||||
using std::string;
|
||||
using ftxui::Canvas, ftxui::Component, ftxui::Screen, ftxui::Button;
|
||||
|
@ -122,10 +123,9 @@ class MapViewUI : public Panel {
|
|||
};
|
||||
|
||||
class GUI {
|
||||
DinkyECS::World& $world;
|
||||
Map& $game_map;
|
||||
LevelManager $level_manager;
|
||||
GameLevel &$level;
|
||||
StatusUI $status_ui;
|
||||
LightRender $lights;
|
||||
MapViewUI $map_view;
|
||||
InventoryUI $inventory_ui;
|
||||
DeathUI $death_ui;
|
||||
|
@ -142,7 +142,8 @@ class GUI {
|
|||
std::vector<Panel*> $active_panels;
|
||||
|
||||
public:
|
||||
GUI(DinkyECS::World& world, Map& game_map);
|
||||
GUI();
|
||||
|
||||
// disable copying
|
||||
GUI(GUI &gui) = delete;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue