|
|
@ -16,7 +16,9 @@ |
|
|
|
|
|
|
|
|
|
|
|
using std::string, std::vector; |
|
|
|
using std::string, std::vector; |
|
|
|
|
|
|
|
|
|
|
|
GUI::GUI(SFMLBackend &backend) : sfml(backend) { |
|
|
|
GUI::GUI(SFMLBackend &backend, int timer_seconds) : |
|
|
|
|
|
|
|
sfml(backend), $timer_seconds(timer_seconds) |
|
|
|
|
|
|
|
{ |
|
|
|
using namespace guecs; |
|
|
|
using namespace guecs; |
|
|
|
|
|
|
|
|
|
|
|
$gui.position(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT); |
|
|
|
$gui.position(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT); |
|
|
@ -44,7 +46,7 @@ GUI::GUI(SFMLBackend &backend) : sfml(backend) { |
|
|
|
auto log = $gui.entity("log"); |
|
|
|
auto log = $gui.entity("log"); |
|
|
|
auto& rect = $gui.get<Rectangle>(log); |
|
|
|
auto& rect = $gui.get<Rectangle>(log); |
|
|
|
rect.color = {255,255,255,255}; |
|
|
|
rect.color = {255,255,255,255}; |
|
|
|
$gui.set<Effect>(log, {1000.0, "build_status"}); |
|
|
|
$gui.set<Effect>(log, {(float)$timer_seconds, "build_status"}); |
|
|
|
|
|
|
|
|
|
|
|
auto clock = $gui.entity("clock"); |
|
|
|
auto clock = $gui.entity("clock"); |
|
|
|
$gui.set<Label>(clock, {L"00:00:00", 110}); |
|
|
|
$gui.set<Label>(clock, {L"00:00:00", 110}); |
|
|
|