Clicker has a bark now.

main
Zed A. Shaw 1 week ago
parent 04f6fef921
commit 9a4b0adc1f
  1. BIN
      assets/clicker_treat_bone.png
  2. 6
      assets/config.json
  3. BIN
      assets/sounds/clicker_bark.ogg
  4. 4
      demos/clicker_game.cpp

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

@ -2,6 +2,7 @@
"sounds": { "sounds": {
"ui_click": "assets/sounds/ui_click.ogg", "ui_click": "assets/sounds/ui_click.ogg",
"ui_hover": "assets/sounds/ui_hover.ogg", "ui_hover": "assets/sounds/ui_hover.ogg",
"clicker_bark": "assets/sounds/clicker_bark.ogg",
"blank": "assets/sounds/blank.ogg" "blank": "assets/sounds/blank.ogg"
}, },
"sprites": { "sprites": {
@ -14,6 +15,11 @@
{"path": "assets/clicker_the_dog-1024.png", {"path": "assets/clicker_the_dog-1024.png",
"frame_width": 1024, "frame_width": 1024,
"frame_height": 1024 "frame_height": 1024
},
"clicker_treat_bone":
{"path": "assets/clicker_treat_bone.png",
"frame_width": 256,
"frame_height": 144
} }
}, },
"graphics": { "graphics": {

Binary file not shown.

@ -37,12 +37,14 @@ struct ClickerUI {
if(name != "clicker") { if(name != "clicker") {
$gui.set<guecs::Rectangle>(id, {}); $gui.set<guecs::Rectangle>(id, {});
$gui.set<guecs::Effect>(id, {}); $gui.set<guecs::Effect>(id, {});
$gui.set<guecs::Label>(id, { guecs::to_wstring(name) }); $gui.set<guecs::Sprite>(id, { "clicker_treat_bone" });
fmt::println("button dim: {},{}", cell.w, cell.h);
$gui.set<guecs::Clickable>(id, { $gui.set<guecs::Clickable>(id, {
[&](auto, auto) { handle_button(Event::A_BUTTON); } [&](auto, auto) { handle_button(Event::A_BUTTON); }
}); });
} else { } else {
$gui.set<guecs::Sprite>(id, {"clicker_the_dog"}); $gui.set<guecs::Sprite>(id, {"clicker_the_dog"});
$gui.set<guecs::Sound>(id, {"clicker_bark"});
$gui.set<guecs::Effect>(id, {0.1f, "ui_shader"}); $gui.set<guecs::Effect>(id, {0.1f, "ui_shader"});
$gui.set<guecs::Clickable>(id, { $gui.set<guecs::Clickable>(id, {
[&](auto, auto) { handle_button(Event::CLICKER); } [&](auto, auto) { handle_button(Event::CLICKER); }

Loading…
Cancel
Save