Reworked the way shaders are configured to reduce the amount of times clicks on buttons cause the shared shaders to reset.

This commit is contained in:
Zed A. Shaw 2025-04-14 23:06:08 -04:00
parent 19b9a4affd
commit 84a5f06dac
5 changed files with 24 additions and 25 deletions

View file

@ -18,7 +18,7 @@ namespace gui {
$gui.set<Sprite>(button, {"leather_pouch-128"});
// $gui.set<Rectangle>(button, {});
$gui.set<Label>(button, {label});
$gui.set<Shader>(button, {.duration=10.0f});
$gui.set<Effect>(button, {.duration=0.1f});
$gui.set<Clickable>(button,
guecs::make_action(*$level.world, event));
}