Remove a bunch of dead code and clean up more.

This commit is contained in:
Zed A. Shaw 2025-04-23 01:56:48 -04:00
parent 8a30fafabb
commit 94c9cd75a8
6 changed files with 47 additions and 256 deletions

14
gui.hpp
View file

@ -2,7 +2,6 @@
#include <string>
#include "game_engine.hpp"
#include "sfmlbackend.hpp"
#include "guecs.hpp"
using std::string;
@ -10,22 +9,27 @@ using std::string;
class Builder;
class GUI {
std::vector<string> _lines;
SFMLBackend &sfml;
int $timer_seconds;
sf::RenderWindow $window;
guecs::UI $gui;
std::wstring $status;
DinkyECS::Entity $log;
DinkyECS::Entity $hp_bar;
bool $hit_error = false;
int $timer_seconds;
std::chrono::time_point<std::chrono::system_clock> $timer_end;
public:
GUI(SFMLBackend &backend, int timer_seconds);
GUI(int timer_seconds);
void output(const string msg);
void update_status(GameEngine &game, size_t line_length, bool is_error);
void configure_status_shader(size_t line_length, bool is_error);
void startup();
bool is_open() { return $window.isOpen(); }
void main_loop();
void handle_events();
void build_success();
void build_failed(bool play_sound, const string &command);