diff options
Diffstat (limited to 'doc/classes/StyleBox.xml')
-rw-r--r-- | doc/classes/StyleBox.xml | 58 |
1 files changed, 21 insertions, 37 deletions
diff --git a/doc/classes/StyleBox.xml b/doc/classes/StyleBox.xml index 0e848a1bf6..024524251d 100644 --- a/doc/classes/StyleBox.xml +++ b/doc/classes/StyleBox.xml @@ -5,87 +5,71 @@ </brief_description> <description> StyleBox is [Resource] that provides an abstract base class for drawing stylized boxes for the UI. StyleBoxes are used for drawing the styles of buttons, line edit 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. + [b]Note:[/b] For children of [Control] that have [i]Theme Properties[/i], the [code]focus[/code] [StyleBox] is displayed over the [code]normal[/code], [code]hover[/code] or [code]pressed[/code] [StyleBox]. This makes the [code]focus[/code] [StyleBox] more reusable across different nodes. </description> <tutorials> </tutorials> <methods> <method name="draw" qualifiers="const"> - <return type="void"> - </return> - <argument index="0" name="canvas_item" type="RID"> - </argument> - <argument index="1" name="rect" type="Rect2"> - </argument> + <return type="void" /> + <argument index="0" name="canvas_item" type="RID" /> + <argument index="1" name="rect" type="Rect2" /> <description> Draws this stylebox using a [CanvasItem] with given [RID]. You can get a [RID] value using [method Object.get_instance_id] on a [CanvasItem]-derived node. </description> </method> <method name="get_center_size" qualifiers="const"> - <return type="Vector2"> - </return> + <return type="Vector2" /> <description> Returns the size of this [StyleBox] without the margins. </description> </method> <method name="get_current_item_drawn" qualifiers="const"> - <return type="CanvasItem"> - </return> + <return type="CanvasItem" /> <description> Returns the [CanvasItem] that handles its [constant CanvasItem.NOTIFICATION_DRAW] or [method CanvasItem._draw] callback at this moment. </description> </method> <method name="get_default_margin" qualifiers="const"> - <return type="float"> - </return> - <argument index="0" name="margin" type="int" enum="Margin"> - </argument> + <return type="float" /> + <argument index="0" name="margin" type="int" enum="Side" /> <description> - Returns the default value of the specified [enum Margin]. + Returns the default margin of the specified [enum Side]. </description> </method> <method name="get_margin" qualifiers="const"> - <return type="float"> - </return> - <argument index="0" name="margin" type="int" enum="Margin"> - </argument> + <return type="float" /> + <argument index="0" name="margin" type="int" enum="Side" /> <description> - Returns the content margin offset for the specified [enum Margin]. + Returns the content margin offset for the specified [enum Side]. Positive values reduce size inwards, unlike [Control]'s margin values. </description> </method> <method name="get_minimum_size" qualifiers="const"> - <return type="Vector2"> - </return> + <return type="Vector2" /> <description> Returns the minimum size that this stylebox can be shrunk to. </description> </method> <method name="get_offset" qualifiers="const"> - <return type="Vector2"> - </return> + <return type="Vector2" /> <description> Returns the "offset" of a stylebox. This helper function returns a value equivalent to [code]Vector2(style.get_margin(MARGIN_LEFT), style.get_margin(MARGIN_TOP))[/code]. </description> </method> <method name="set_default_margin"> - <return type="void"> - </return> - <argument index="0" name="margin" type="int" enum="Margin"> - </argument> - <argument index="1" name="offset" type="float"> - </argument> + <return type="void" /> + <argument index="0" name="margin" type="int" enum="Side" /> + <argument index="1" name="offset" type="float" /> <description> - Sets the default value of the specified [enum Margin] to given [code]offset[/code] in pixels. + Sets the default value of the specified [enum Side] to [code]offset[/code] pixels. </description> </method> <method name="test_mask" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="point" type="Vector2"> - </argument> - <argument index="1" name="rect" type="Rect2"> - </argument> + <return type="bool" /> + <argument index="0" name="point" type="Vector2" /> + <argument index="1" name="rect" type="Rect2" /> <description> Test a position in a rectangle, return whether it passes the mask test. </description> |