Attention: Here be dragons
This is the latest
(unstable) version of this documentation, which may document features
not available in or compatible with released stable versions of Godot.
Checking the stable version of the documentation...
StyleBox¶
Inherits: Resource < RefCounted < Object
Inherited By: StyleBoxEmpty, StyleBoxFlat, StyleBoxLine, StyleBoxTexture
Abstract base class for defining stylized boxes for UI elements.
Description¶
StyleBox is an abstract base class for drawing stylized boxes for UI elements. It is used for panels, buttons, LineEdit backgrounds, Tree backgrounds, etc. and also for testing a transparency mask for pointer signals. If mask test fails on a StyleBox assigned as mask to a control, clicks and motion signals will go through it to the one below.
Note: For control nodes that have Theme Properties, the focus
StyleBox is displayed over the normal
, hover
or pressed
StyleBox. This makes the focus
StyleBox more reusable across different nodes.
Properties¶
|
||
|
||
|
||
|
Methods¶
void |
|
_get_draw_rect ( Rect2 rect ) virtual const |
|
_get_minimum_size ( ) virtual const |
|
_test_mask ( Vector2 point, Rect2 rect ) virtual const |
|
void |
|
get_content_margin ( Side margin ) const |
|
get_current_item_drawn ( ) const |
|
get_margin ( Side margin ) const |
|
get_minimum_size ( ) const |
|
get_offset ( ) const |
|
void |
set_content_margin ( Side margin, float offset ) |
void |
set_content_margin_all ( float offset ) |