Mute the bark for now and try a pixel art thing on the work computer after a bit of more art work.

main
Zed A. Shaw 1 week ago
parent f5f16d650f
commit 56f36b33ee
  1. BIN
      assets/work_computer-1024.png
  2. 7
      main.cpp

Binary file not shown.

Before

Width:  |  Height:  |  Size: 668 KiB

After

Width:  |  Height:  |  Size: 73 KiB

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

Loading…
Cancel
Save