imgui_bind
Bind a widget's value to a target visual property, with optional scale and offset, updating every frame. Link controls like sliders to properties such as opacity or position.
Instructions
Bind a widget's value to a visual property. Each frame the source widget's property is read, scaled, offset, and written to the target. Example: bind a slider's value to a draw layer's opacity.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"window": "<window>",
"source_widget": "<source_widget>",
"source_property": "<source_property>",
"target_type": "<target_type>",
"target_id": "<target_id>",
"target_property": "<target_property>"
},
"name": "imgui_bind"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| scale | No | Multiplier applied to source value (default 1.0) | |
| offset | No | Offset added after scaling (default 0.0) | |
| window | Yes | Window containing the source widget | |
| target_id | Yes | Target draw layer, hit region, or widget id | |
| target_type | Yes | Type of target to write to | |
| source_widget | Yes | Source widget id | |
| source_property | Yes | Property to read from the source widget | |
| target_property | Yes | Target property: opacity, position_x, position_y, scale_x, scale_y, rotation, value, size_x, size_y |