#include "gui.hpp" #include // for EXIT_SUCCESS #include // for milliseconds #include #include // for allocator, shared_ptr #include // for operator+, to_string #include #include #include #include "builder.hpp" #include #include #include "sound.hpp" using std::string, std::vector; GUI::GUI(SFMLBackend &backend) : sfml(backend) { using namespace guecs; $gui.position(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT); $gui.layout( "[*%(200,300)face|_|*%(100,300)stats|*%(200,500)log|_]" "[_|_|_|_|_]" "[_|_|_|_|_]" "[*%(300,200)clock|_|_|_|_]" "[_|_|_|_|_]" "[hp_bar]"); $gui.world().set_the({$gui.$parser, ColorValue::DARK_MID}); for(auto& [name, cell] : $gui.cells()) { auto ent = $gui.entity(name); $gui.set(ent, {}); } auto face = $gui.entity("face"); $gui.set(face, {"building"}); auto stats = $gui.entity("stats"); $gui.set(stats, {L"STATS"}); auto log = $gui.entity("log"); $gui.set(log, {L"LOG"}); auto clock = $gui.entity("clock"); $gui.set