|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <string>
|
|
|
|
#include "game_engine.hpp"
|
|
|
|
#include "sfmlbackend.hpp"
|
|
|
|
|
|
|
|
using std::string;
|
|
|
|
|
|
|
|
class Builder;
|
|
|
|
|
|
|
|
class GUI {
|
|
|
|
std::vector<string> _lines;
|
|
|
|
|
|
|
|
SoundQuip you_died_sound;
|
|
|
|
SoundQuip build_success_sound;
|
|
|
|
SoundQuip build_failed_sound;
|
|
|
|
SoundQuip building_sound;
|
|
|
|
SFMLBackend &gui;
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
GUI(SFMLBackend &backend);
|
|
|
|
|
|
|
|
// prevent copy
|
|
|
|
GUI(GUI &g) = delete;
|
|
|
|
|
|
|
|
void output(const string msg);
|
|
|
|
|
|
|
|
void main_loop();
|
|
|
|
|
|
|
|
void build_success();
|
|
|
|
void build_failed(bool play_sound, const string &command);
|
|
|
|
void you_died();
|
|
|
|
void building();
|
|
|
|
};
|