mirror of
https://github.com/godotengine/godot-docs.git
synced 2025-12-31 17:49:03 +03:00
332 lines
14 KiB
ReStructuredText
332 lines
14 KiB
ReStructuredText
:github_url: hide
|
|
|
|
.. Generated automatically by doc/tools/makerst.py in Godot's source tree.
|
|
.. DO NOT EDIT THIS FILE, but the StyleBoxTexture.xml source instead.
|
|
.. The source is found in doc/classes or modules/<name>/doc_classes.
|
|
|
|
.. _class_StyleBoxTexture:
|
|
|
|
StyleBoxTexture
|
|
===============
|
|
|
|
**Inherits:** :ref:`StyleBox<class_StyleBox>` **<** :ref:`Resource<class_Resource>` **<** :ref:`Reference<class_Reference>` **<** :ref:`Object<class_Object>`
|
|
|
|
**Category:** Core
|
|
|
|
Brief Description
|
|
-----------------
|
|
|
|
Texture Based 3x3 scale style.
|
|
|
|
Properties
|
|
----------
|
|
|
|
+--------------------------------------------------------------+----------------------------------------------------------------------------------------+
|
|
| :ref:`AxisStretchMode<enum_StyleBoxTexture_AxisStretchMode>` | :ref:`axis_stretch_horizontal<class_StyleBoxTexture_property_axis_stretch_horizontal>` |
|
|
+--------------------------------------------------------------+----------------------------------------------------------------------------------------+
|
|
| :ref:`AxisStretchMode<enum_StyleBoxTexture_AxisStretchMode>` | :ref:`axis_stretch_vertical<class_StyleBoxTexture_property_axis_stretch_vertical>` |
|
|
+--------------------------------------------------------------+----------------------------------------------------------------------------------------+
|
|
| :ref:`bool<class_bool>` | :ref:`draw_center<class_StyleBoxTexture_property_draw_center>` |
|
|
+--------------------------------------------------------------+----------------------------------------------------------------------------------------+
|
|
| :ref:`float<class_float>` | :ref:`expand_margin_bottom<class_StyleBoxTexture_property_expand_margin_bottom>` |
|
|
+--------------------------------------------------------------+----------------------------------------------------------------------------------------+
|
|
| :ref:`float<class_float>` | :ref:`expand_margin_left<class_StyleBoxTexture_property_expand_margin_left>` |
|
|
+--------------------------------------------------------------+----------------------------------------------------------------------------------------+
|
|
| :ref:`float<class_float>` | :ref:`expand_margin_right<class_StyleBoxTexture_property_expand_margin_right>` |
|
|
+--------------------------------------------------------------+----------------------------------------------------------------------------------------+
|
|
| :ref:`float<class_float>` | :ref:`expand_margin_top<class_StyleBoxTexture_property_expand_margin_top>` |
|
|
+--------------------------------------------------------------+----------------------------------------------------------------------------------------+
|
|
| :ref:`float<class_float>` | :ref:`margin_bottom<class_StyleBoxTexture_property_margin_bottom>` |
|
|
+--------------------------------------------------------------+----------------------------------------------------------------------------------------+
|
|
| :ref:`float<class_float>` | :ref:`margin_left<class_StyleBoxTexture_property_margin_left>` |
|
|
+--------------------------------------------------------------+----------------------------------------------------------------------------------------+
|
|
| :ref:`float<class_float>` | :ref:`margin_right<class_StyleBoxTexture_property_margin_right>` |
|
|
+--------------------------------------------------------------+----------------------------------------------------------------------------------------+
|
|
| :ref:`float<class_float>` | :ref:`margin_top<class_StyleBoxTexture_property_margin_top>` |
|
|
+--------------------------------------------------------------+----------------------------------------------------------------------------------------+
|
|
| :ref:`Color<class_Color>` | :ref:`modulate_color<class_StyleBoxTexture_property_modulate_color>` |
|
|
+--------------------------------------------------------------+----------------------------------------------------------------------------------------+
|
|
| :ref:`Texture<class_Texture>` | :ref:`normal_map<class_StyleBoxTexture_property_normal_map>` |
|
|
+--------------------------------------------------------------+----------------------------------------------------------------------------------------+
|
|
| :ref:`Rect2<class_Rect2>` | :ref:`region_rect<class_StyleBoxTexture_property_region_rect>` |
|
|
+--------------------------------------------------------------+----------------------------------------------------------------------------------------+
|
|
| :ref:`Texture<class_Texture>` | :ref:`texture<class_StyleBoxTexture_property_texture>` |
|
|
+--------------------------------------------------------------+----------------------------------------------------------------------------------------+
|
|
|
|
Methods
|
|
-------
|
|
|
|
+------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| void | :ref:`set_expand_margin_all<class_StyleBoxTexture_method_set_expand_margin_all>` **(** :ref:`float<class_float>` size **)** |
|
|
+------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| void | :ref:`set_expand_margin_individual<class_StyleBoxTexture_method_set_expand_margin_individual>` **(** :ref:`float<class_float>` size_left, :ref:`float<class_float>` size_top, :ref:`float<class_float>` size_right, :ref:`float<class_float>` size_bottom **)** |
|
|
+------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
|
Signals
|
|
-------
|
|
|
|
.. _class_StyleBoxTexture_signal_texture_changed:
|
|
|
|
- **texture_changed** **(** **)**
|
|
|
|
Enumerations
|
|
------------
|
|
|
|
.. _enum_StyleBoxTexture_AxisStretchMode:
|
|
|
|
.. _class_StyleBoxTexture_constant_AXIS_STRETCH_MODE_STRETCH:
|
|
|
|
.. _class_StyleBoxTexture_constant_AXIS_STRETCH_MODE_TILE:
|
|
|
|
.. _class_StyleBoxTexture_constant_AXIS_STRETCH_MODE_TILE_FIT:
|
|
|
|
enum **AxisStretchMode**:
|
|
|
|
- **AXIS_STRETCH_MODE_STRETCH** = **0**
|
|
|
|
- **AXIS_STRETCH_MODE_TILE** = **1**
|
|
|
|
- **AXIS_STRETCH_MODE_TILE_FIT** = **2**
|
|
|
|
Description
|
|
-----------
|
|
|
|
Texture Based 3x3 scale style. This stylebox performs a 3x3 scaling of a texture, where only the center cell is fully stretched. This allows for the easy creation of bordered styles.
|
|
|
|
Property Descriptions
|
|
---------------------
|
|
|
|
.. _class_StyleBoxTexture_property_axis_stretch_horizontal:
|
|
|
|
- :ref:`AxisStretchMode<enum_StyleBoxTexture_AxisStretchMode>` **axis_stretch_horizontal**
|
|
|
|
+----------+--------------------------------+
|
|
| *Setter* | set_h_axis_stretch_mode(value) |
|
|
+----------+--------------------------------+
|
|
| *Getter* | get_h_axis_stretch_mode() |
|
|
+----------+--------------------------------+
|
|
|
|
----
|
|
|
|
.. _class_StyleBoxTexture_property_axis_stretch_vertical:
|
|
|
|
- :ref:`AxisStretchMode<enum_StyleBoxTexture_AxisStretchMode>` **axis_stretch_vertical**
|
|
|
|
+----------+--------------------------------+
|
|
| *Setter* | set_v_axis_stretch_mode(value) |
|
|
+----------+--------------------------------+
|
|
| *Getter* | get_v_axis_stretch_mode() |
|
|
+----------+--------------------------------+
|
|
|
|
----
|
|
|
|
.. _class_StyleBoxTexture_property_draw_center:
|
|
|
|
- :ref:`bool<class_bool>` **draw_center**
|
|
|
|
+----------+--------------------------+
|
|
| *Setter* | set_draw_center(value) |
|
|
+----------+--------------------------+
|
|
| *Getter* | is_draw_center_enabled() |
|
|
+----------+--------------------------+
|
|
|
|
----
|
|
|
|
.. _class_StyleBoxTexture_property_expand_margin_bottom:
|
|
|
|
- :ref:`float<class_float>` **expand_margin_bottom**
|
|
|
|
+----------+-------------------------------+
|
|
| *Setter* | set_expand_margin_size(value) |
|
|
+----------+-------------------------------+
|
|
| *Getter* | get_expand_margin_size() |
|
|
+----------+-------------------------------+
|
|
|
|
Expands the bottom margin of this style box when drawing, causing it be drawn larger than requested.
|
|
|
|
----
|
|
|
|
.. _class_StyleBoxTexture_property_expand_margin_left:
|
|
|
|
- :ref:`float<class_float>` **expand_margin_left**
|
|
|
|
+----------+-------------------------------+
|
|
| *Setter* | set_expand_margin_size(value) |
|
|
+----------+-------------------------------+
|
|
| *Getter* | get_expand_margin_size() |
|
|
+----------+-------------------------------+
|
|
|
|
Expands the left margin of this style box when drawing, causing it be drawn larger than requested.
|
|
|
|
----
|
|
|
|
.. _class_StyleBoxTexture_property_expand_margin_right:
|
|
|
|
- :ref:`float<class_float>` **expand_margin_right**
|
|
|
|
+----------+-------------------------------+
|
|
| *Setter* | set_expand_margin_size(value) |
|
|
+----------+-------------------------------+
|
|
| *Getter* | get_expand_margin_size() |
|
|
+----------+-------------------------------+
|
|
|
|
Expands the right margin of this style box when drawing, causing it be drawn larger than requested.
|
|
|
|
----
|
|
|
|
.. _class_StyleBoxTexture_property_expand_margin_top:
|
|
|
|
- :ref:`float<class_float>` **expand_margin_top**
|
|
|
|
+----------+-------------------------------+
|
|
| *Setter* | set_expand_margin_size(value) |
|
|
+----------+-------------------------------+
|
|
| *Getter* | get_expand_margin_size() |
|
|
+----------+-------------------------------+
|
|
|
|
Expands the top margin of this style box when drawing, causing it be drawn larger than requested.
|
|
|
|
----
|
|
|
|
.. _class_StyleBoxTexture_property_margin_bottom:
|
|
|
|
- :ref:`float<class_float>` **margin_bottom**
|
|
|
|
+----------+------------------------+
|
|
| *Setter* | set_margin_size(value) |
|
|
+----------+------------------------+
|
|
| *Getter* | get_margin_size() |
|
|
+----------+------------------------+
|
|
|
|
Increases the bottom margin of the 3x3 texture box.
|
|
|
|
A higher value means more of the source texture is considered to be part of the bottom border of the 3x3 box.
|
|
|
|
This is also the value used as fallback for :ref:`StyleBox.content_margin_bottom<class_StyleBox_property_content_margin_bottom>` if it is negative.
|
|
|
|
----
|
|
|
|
.. _class_StyleBoxTexture_property_margin_left:
|
|
|
|
- :ref:`float<class_float>` **margin_left**
|
|
|
|
+----------+------------------------+
|
|
| *Setter* | set_margin_size(value) |
|
|
+----------+------------------------+
|
|
| *Getter* | get_margin_size() |
|
|
+----------+------------------------+
|
|
|
|
Increases the left margin of the 3x3 texture box.
|
|
|
|
A higher value means more of the source texture is considered to be part of the left border of the 3x3 box.
|
|
|
|
This is also the value used as fallback for :ref:`StyleBox.content_margin_left<class_StyleBox_property_content_margin_left>` if it is negative.
|
|
|
|
----
|
|
|
|
.. _class_StyleBoxTexture_property_margin_right:
|
|
|
|
- :ref:`float<class_float>` **margin_right**
|
|
|
|
+----------+------------------------+
|
|
| *Setter* | set_margin_size(value) |
|
|
+----------+------------------------+
|
|
| *Getter* | get_margin_size() |
|
|
+----------+------------------------+
|
|
|
|
Increases the right margin of the 3x3 texture box.
|
|
|
|
A higher value means more of the source texture is considered to be part of the right border of the 3x3 box.
|
|
|
|
This is also the value used as fallback for :ref:`StyleBox.content_margin_right<class_StyleBox_property_content_margin_right>` if it is negative.
|
|
|
|
----
|
|
|
|
.. _class_StyleBoxTexture_property_margin_top:
|
|
|
|
- :ref:`float<class_float>` **margin_top**
|
|
|
|
+----------+------------------------+
|
|
| *Setter* | set_margin_size(value) |
|
|
+----------+------------------------+
|
|
| *Getter* | get_margin_size() |
|
|
+----------+------------------------+
|
|
|
|
Increases the top margin of the 3x3 texture box.
|
|
|
|
A higher value means more of the source texture is considered to be part of the top border of the 3x3 box.
|
|
|
|
This is also the value used as fallback for :ref:`StyleBox.content_margin_top<class_StyleBox_property_content_margin_top>` if it is negative.
|
|
|
|
----
|
|
|
|
.. _class_StyleBoxTexture_property_modulate_color:
|
|
|
|
- :ref:`Color<class_Color>` **modulate_color**
|
|
|
|
+----------+---------------------+
|
|
| *Setter* | set_modulate(value) |
|
|
+----------+---------------------+
|
|
| *Getter* | get_modulate() |
|
|
+----------+---------------------+
|
|
|
|
Modulates the color of the texture when this style box is drawn.
|
|
|
|
----
|
|
|
|
.. _class_StyleBoxTexture_property_normal_map:
|
|
|
|
- :ref:`Texture<class_Texture>` **normal_map**
|
|
|
|
+----------+-----------------------+
|
|
| *Setter* | set_normal_map(value) |
|
|
+----------+-----------------------+
|
|
| *Getter* | get_normal_map() |
|
|
+----------+-----------------------+
|
|
|
|
The normal map to use when drawing this style box.
|
|
|
|
----
|
|
|
|
.. _class_StyleBoxTexture_property_region_rect:
|
|
|
|
- :ref:`Rect2<class_Rect2>` **region_rect**
|
|
|
|
+----------+------------------------+
|
|
| *Setter* | set_region_rect(value) |
|
|
+----------+------------------------+
|
|
| *Getter* | get_region_rect() |
|
|
+----------+------------------------+
|
|
|
|
Species a sub region of the texture to use.
|
|
|
|
This is equivalent to first wrapping the texture in an :ref:`AtlasTexture<class_AtlasTexture>` with the same region.
|
|
|
|
----
|
|
|
|
.. _class_StyleBoxTexture_property_texture:
|
|
|
|
- :ref:`Texture<class_Texture>` **texture**
|
|
|
|
+----------+--------------------+
|
|
| *Setter* | set_texture(value) |
|
|
+----------+--------------------+
|
|
| *Getter* | get_texture() |
|
|
+----------+--------------------+
|
|
|
|
The texture to use when drawing this style box.
|
|
|
|
Method Descriptions
|
|
-------------------
|
|
|
|
.. _class_StyleBoxTexture_method_set_expand_margin_all:
|
|
|
|
- void **set_expand_margin_all** **(** :ref:`float<class_float>` size **)**
|
|
|
|
----
|
|
|
|
.. _class_StyleBoxTexture_method_set_expand_margin_individual:
|
|
|
|
- void **set_expand_margin_individual** **(** :ref:`float<class_float>` size_left, :ref:`float<class_float>` size_top, :ref:`float<class_float>` size_right, :ref:`float<class_float>` size_bottom **)**
|
|
|