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.
38 lines
816 B
38 lines
816 B
#pragma once
|
|
|
|
#include <string>
|
|
#include "game_engine.hpp"
|
|
#include "guecs.hpp"
|
|
|
|
using std::string;
|
|
|
|
class Builder;
|
|
|
|
class GUI {
|
|
int $timer_seconds;
|
|
sf::RenderWindow $window;
|
|
guecs::UI $gui;
|
|
std::wstring $status;
|
|
DinkyECS::Entity $log;
|
|
DinkyECS::Entity $hp_bar;
|
|
bool $hit_error = false;
|
|
std::chrono::time_point<std::chrono::system_clock> $timer_end;
|
|
|
|
public:
|
|
|
|
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);
|
|
void you_died();
|
|
void building();
|
|
};
|
|
|