34 lines
643 B
C++
34 lines
643 B
C++
#pragma once
|
|
|
|
#include <string>
|
|
#include "game_engine.hpp"
|
|
#include "sfmlbackend.hpp"
|
|
#include "guecs.hpp"
|
|
|
|
using std::string;
|
|
|
|
class Builder;
|
|
|
|
class GUI {
|
|
std::vector<string> _lines;
|
|
SFMLBackend &sfml;
|
|
guecs::UI $gui;
|
|
std::wstring $status;
|
|
DinkyECS::Entity $hp_bar;
|
|
bool $hit_error = false;
|
|
int $timer_seconds;
|
|
|
|
public:
|
|
|
|
GUI(SFMLBackend &backend, int timer_seconds);
|
|
|
|
void output(const string msg);
|
|
void update_status(GameEngine &game, size_t line_length, bool is_error);
|
|
|
|
void main_loop();
|
|
|
|
void build_success();
|
|
void build_failed(bool play_sound, const string &command);
|
|
void you_died();
|
|
void building();
|
|
};
|