There's a simple death screen now and you can exit. More work on what death means later.
This commit is contained in:
parent
f2864a62ee
commit
6cabd62c7f
5 changed files with 72 additions and 19 deletions
18
gui.hpp
18
gui.hpp
|
@ -47,6 +47,17 @@ struct UnDumbTSS {
|
|||
}
|
||||
};
|
||||
|
||||
class DeathUI : public Panel {
|
||||
public:
|
||||
Component $render = nullptr;
|
||||
Component $exit_button = nullptr;
|
||||
std::string $quip = "You died like a dog.";
|
||||
|
||||
DeathUI() :
|
||||
Panel(INVENTORY_PIXEL_X, INVENTORY_PIXEL_Y, INVENTORY_WIDTH, INVENTORY_HEIGHT) {}
|
||||
|
||||
void create_render();
|
||||
};
|
||||
|
||||
class InventoryUI : public Panel {
|
||||
public:
|
||||
|
@ -105,13 +116,15 @@ class GUI {
|
|||
LightRender $lights;
|
||||
MapViewUI $map_view;
|
||||
InventoryUI $inventory_ui;
|
||||
DeathUI $death_ui;
|
||||
Canvas $canvas;
|
||||
bool $show_modal = false;
|
||||
bool $inventory_open = false;
|
||||
bool $player_died = false;
|
||||
Component $test_button;
|
||||
SoundManager $sounds;
|
||||
SFMLRender $renderer;
|
||||
UnDumbTSS $paused;
|
||||
std::vector<Panel*> $panels;
|
||||
std::vector<Panel*> $active_panels;
|
||||
|
||||
public:
|
||||
GUI(DinkyECS::World& world, Map& game_map);
|
||||
|
@ -133,4 +146,5 @@ public:
|
|||
void pause_screen();
|
||||
void draw_paused();
|
||||
void init_shaders();
|
||||
void toggle_modal(Panel *panel, bool &is_open_out);
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue