I can now apply shaders to any GUI element, but I need a shader manager that will allow for hot reloading and tracking input/output variables.
This commit is contained in:
parent
80b4faf940
commit
a5b8e411e3
8 changed files with 121 additions and 16 deletions
|
@ -15,9 +15,10 @@ namespace gui {
|
|||
|
||||
void CombatUI::make_button(std::string name, std::wstring label, Events::GUI event) {
|
||||
auto button = $gui.entity(name);
|
||||
// $gui.set<Sprite>(button, {"leather_pouch-128"});
|
||||
$gui.set<Rectangle>(button, {});
|
||||
$gui.set<Sprite>(button, {"leather_pouch-128"});
|
||||
// $gui.set<Rectangle>(button, {});
|
||||
$gui.set<Label>(button, {label});
|
||||
$gui.set<Shader>(button, {.duration=0.2f});
|
||||
$gui.set<Clickable>(button,
|
||||
guecs::make_action(*$level.world, event));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue