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:
parent
19b9a4affd
commit
84a5f06dac
5 changed files with 24 additions and 25 deletions
|
@ -42,7 +42,7 @@ namespace gui {
|
|||
auto button = $gui.entity(name);
|
||||
|
||||
if(name == "circle_area") {
|
||||
$gui.set<Shader>(button, {0.4f});
|
||||
$gui.set<Effect>(button, {0.4f});
|
||||
$gui.set<Sprite>(button, {"the_ritual_circle"});
|
||||
$gui.set<Clickable>(button, {
|
||||
[&](auto ent, auto){ ritual_circle_clicked(ent); }
|
||||
|
@ -50,7 +50,7 @@ namespace gui {
|
|||
} else if(name.starts_with("inv_slot")) {
|
||||
$gui.set<Sprite>(button, {
|
||||
fmt::format("{}-64", junk_list[button % junk_list.size()])});
|
||||
$gui.set<Shader>(button, {0.4f});
|
||||
$gui.set<Effect>(button, {0.4f});
|
||||
$gui.set<Clickable>(button, {
|
||||
[&](auto ent, auto){ inv_slot_clicked(ent); }
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue