Clicker has a bark now.
This commit is contained in:
parent
04f6fef921
commit
9a4b0adc1f
4 changed files with 9 additions and 1 deletions
BIN
assets/clicker_treat_bone.png
Normal file
BIN
assets/clicker_treat_bone.png
Normal file
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": {
|
||||||
|
|
BIN
assets/sounds/clicker_bark.ogg
Normal file
BIN
assets/sounds/clicker_bark.ogg
Normal file
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…
Add table
Add a link
Reference in a new issue