|
|
|
@ -15,6 +15,7 @@ |
|
|
|
|
ControlUI::ControlUI(sf::RenderWindow& presenter) : |
|
|
|
|
$presenter(presenter) |
|
|
|
|
{ |
|
|
|
|
|
|
|
|
|
$gui.position(0, 0, CONTROL_WIDTH, CONTROL_HEIGHT); |
|
|
|
|
$gui.layout( |
|
|
|
|
"[status|=%(100,100)current]" |
|
|
|
@ -31,11 +32,9 @@ void ControlUI::init() { |
|
|
|
|
|
|
|
|
|
auto current = $gui.entity("current"); |
|
|
|
|
$gui.set<guecs::Text>(current, {L"Current Slide"}); |
|
|
|
|
$gui.set<guecs::Rectangle>(current, {}); |
|
|
|
|
|
|
|
|
|
auto next = $gui.entity("next"); |
|
|
|
|
$gui.set<guecs::Text>(next, {L"Next Slide"}); |
|
|
|
|
$gui.set<guecs::Rectangle>(next, {}); |
|
|
|
|
|
|
|
|
|
$gui.init(); |
|
|
|
|
|
|
|
|
@ -52,8 +51,8 @@ void ControlUI::render(sf::RenderWindow& window) { |
|
|
|
|
|
|
|
|
|
$status->update(fmt::format(L"pos={},{}\nsize={},{}", |
|
|
|
|
pos.x, pos.y, size.x, size.y)); |
|
|
|
|
|
|
|
|
|
window.clear(); |
|
|
|
|
|
|
|
|
|
$gui.render(window); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|