Problem
When authoring UI buttons (via UiButtonActions on canvas/markup buttons), there is no direct way in the Inspector to:
Fill out the full set of Lua script event callbacks (on_click / on_press, on_enter, on_exit, etc.).
Define per-event animation triggers (separate from the Lua names) for on_click/on_press, on_enter, on_exit, etc.
Control the scope of those animation triggers: whether they should affect only the local animation tree (nearest ancestor AnimatorComponent), a named group of animators, or be treated as global.
Currently the button inspector exposes some trigger fields and a single anim_action, but they are always forced to the nearest ancestor animator. The existing AnimParamBroadcast (Local/Group/Global) + param_group system on animators exists but buttons have no UI to opt into global or grouped triggering. This makes it difficult to drive menu/state-machine logic from buttons without writing Lua for every case.
Proposed Solution
Add the following to the UiButtonActions inspector (in renzora_game_ui_editor):
Lua / Script events section (clear string fields):
On Click / On Press
On Release
On Enter
On Exit
Animation Triggers section (per-event):
For each of the above events, a "Trigger" string field (e.g. "Press Trigger", "Enter Trigger", "Exit Trigger").
Next to (or under) each trigger field, a scope selector with three options:
Animation Tree (current default behavior — nearest ancestor AnimatorComponent only)
Grouped (fan out to all animators sharing the same param_group, using the existing broadcast system)
Global (fan out to every animator in the scene)
Keep the existing Anim Action (Trigger / Set True / Set False / Set Float) + Anim Value controls, but allow them to be associated with the chosen scope.
The runtime (button_action.rs + animation bridge + param_broadcast) should respect the chosen scope when firing broadcast_sm_trigger / set_anim_param actions from the button. The button component should be able to override or explicitly request the desired broadcast mode instead of always inheriting from the target animator.
Alternatives Considered
Always using the animator's own param_broadcast setting: too indirect — the button author often doesn't control (or even see) the animator's settings, especially for menu systems.
Only exposing a single global "Broadcast" dropdown on the button: not granular enough when you want different events (e.g. Enter vs Click) to have different scopes.
Requiring Lua for all non-local cases: defeats the purpose of the declarative button actions that were added to avoid script for simple animator driving.
Adding a new "target animator" Name field per button: more complex and less discoverable than leveraging the already-existing Group/Global broadcast infrastructure.
The proposed per-trigger + explicit scope (Global / Grouped / Animation Tree) is the most direct and consistent with how AnimParamBroadcast already works elsewhere.
Additional Context
I'm on Windows, release alpha-r5.
This builds on the existing UiButtonActions, press_trigger/enter_trigger etc. fields, UiAnimAction, and the AnimParamBroadcast + param_group + collect_trigger_targets system in renzora_animation. The goal is to make the declarative button-driven animation workflow (without scripts) first-class for menus and UI state machines, matching the power already present for script-driven parameters.
Related work: the param broadcast system and earlier discussions around making global/grouped animation parameters usable from UI without heavy scripting.
Problem
When authoring UI buttons (via UiButtonActions on canvas/markup buttons), there is no direct way in the Inspector to:
Fill out the full set of Lua script event callbacks (on_click / on_press, on_enter, on_exit, etc.).
Define per-event animation triggers (separate from the Lua names) for on_click/on_press, on_enter, on_exit, etc.
Control the scope of those animation triggers: whether they should affect only the local animation tree (nearest ancestor AnimatorComponent), a named group of animators, or be treated as global.
Currently the button inspector exposes some trigger fields and a single anim_action, but they are always forced to the nearest ancestor animator. The existing AnimParamBroadcast (Local/Group/Global) + param_group system on animators exists but buttons have no UI to opt into global or grouped triggering. This makes it difficult to drive menu/state-machine logic from buttons without writing Lua for every case.
Proposed Solution
Add the following to the UiButtonActions inspector (in renzora_game_ui_editor):
Lua / Script events section (clear string fields):
On Click / On Press
On Release
On Enter
On Exit
Animation Triggers section (per-event):
For each of the above events, a "Trigger" string field (e.g. "Press Trigger", "Enter Trigger", "Exit Trigger").
Next to (or under) each trigger field, a scope selector with three options:
Animation Tree (current default behavior — nearest ancestor AnimatorComponent only)
Grouped (fan out to all animators sharing the same param_group, using the existing broadcast system)
Global (fan out to every animator in the scene)
Keep the existing Anim Action (Trigger / Set True / Set False / Set Float) + Anim Value controls, but allow them to be associated with the chosen scope.
The runtime (button_action.rs + animation bridge + param_broadcast) should respect the chosen scope when firing broadcast_sm_trigger / set_anim_param actions from the button. The button component should be able to override or explicitly request the desired broadcast mode instead of always inheriting from the target animator.
Alternatives Considered
Always using the animator's own param_broadcast setting: too indirect — the button author often doesn't control (or even see) the animator's settings, especially for menu systems.
Only exposing a single global "Broadcast" dropdown on the button: not granular enough when you want different events (e.g. Enter vs Click) to have different scopes.
Requiring Lua for all non-local cases: defeats the purpose of the declarative button actions that were added to avoid script for simple animator driving.
Adding a new "target animator" Name field per button: more complex and less discoverable than leveraging the already-existing Group/Global broadcast infrastructure.
The proposed per-trigger + explicit scope (Global / Grouped / Animation Tree) is the most direct and consistent with how AnimParamBroadcast already works elsewhere.
Additional Context
I'm on Windows, release alpha-r5.
This builds on the existing UiButtonActions, press_trigger/enter_trigger etc. fields, UiAnimAction, and the AnimParamBroadcast + param_group + collect_trigger_targets system in renzora_animation. The goal is to make the declarative button-driven animation workflow (without scripts) first-class for menus and UI state machines, matching the power already present for script-driven parameters.
Related work: the param broadcast system and earlier discussions around making global/grouped animation parameters usable from UI without heavy scripting.