set_stylebox
Apply a StyleBoxFlat to a Godot Theme type/state to customize UI control appearance, including background, border, corner radius, and content margins.
Instructions
Attach a StyleBoxFlat to a Theme type/state.
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": {
"theme_path": "<theme_path>",
"type": "<type>"
},
"name": "set_stylebox"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| type | Yes | Control type (e.g. "Button") | |
| state | No | Style state (normal, hover, pressed, focus, disabled) | normal |
| bg_color | No | Background color (e.g. "Color(0.2, 0.2, 0.2, 1)") | |
| theme_path | Yes | Path to .tres Theme file | |
| border_color | No | Border color | |
| border_width | No | Border widths [left, right, top, bottom] | |
| corner_radius | No | Corner radii [top_left, top_right, bottom_right, bottom_left] | |
| content_margin | No | Content margins [left, right, top, bottom] |