imgui_set_callback
Set declarative callback actions that fire automatically on widget events such as clicks, changes, or hovers. Trigger visibility toggles, value updates, or scene switches without polling round-trips.
Instructions
Set a declarative callback action that fires automatically when a widget event occurs. Actions: toggle_visibility, set_visibility, set_value, switch_scene. No polling round-trip needed.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| action | Yes | Action to perform | |
| params | No | Action parameters. toggle_visibility/set_visibility: {"widget": "id", "visible": true}. set_value: {"widget": "id", "value": 0.5}. switch_scene: {"scene": "name"}. | |
| window | Yes | Window containing the trigger widget | |
| trigger_event | No | Event that fires the action (default: clicked) | |
| trigger_widget | Yes | Widget id that triggers the action |