|
|
|
@ -1,5 +1,6 @@ |
|
|
|
|
#include "guecs/sfml/backend.hpp" |
|
|
|
|
#include "guecs/sfml/components.hpp" |
|
|
|
|
#include "guecs/sfml/sound.hpp" |
|
|
|
|
#include "guecs/ui.hpp" |
|
|
|
|
#include <fmt/xchar.h> |
|
|
|
|
#include <deque> |
|
|
|
@ -164,11 +165,12 @@ struct WorkComputerUI { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void init() { |
|
|
|
|
$gui.set<guecs::Background>($gui.MAIN, {$gui.$parser}); |
|
|
|
|
guecs::Background bg{$gui.$parser}; |
|
|
|
|
bg.set_sprite("work_computer"); |
|
|
|
|
$gui.set<guecs::Background>($gui.MAIN, bg); |
|
|
|
|
|
|
|
|
|
auto computer = $gui.entity("computer"); |
|
|
|
|
$gui.set<guecs::Label>(computer, {L"Work Computer"}); |
|
|
|
|
$gui.set<guecs::Sprite>(computer, {"work_computer"}); |
|
|
|
|
$gui.set<guecs::Clickable>(computer, { [&](auto, auto) { |
|
|
|
|
GO_TO_WORK = false; |
|
|
|
|
fmt::println("Leaving Work!"); |
|
|
|
@ -189,6 +191,7 @@ struct WorkComputerUI { |
|
|
|
|
|
|
|
|
|
int main() { |
|
|
|
|
sfml::Backend backend; |
|
|
|
|
sound::mute(true); |
|
|
|
|
guecs::init(&backend); |
|
|
|
|
|
|
|
|
|
sf::RenderWindow window(sf::VideoMode({SCREEN_WIDTH, SCREEN_HEIGHT}), "Clicker the Dog"); |
|
|
|
|