From f50bac71dfa5a26ea9a6f3f513fce2a8fe8c0e4e Mon Sep 17 00:00:00 2001 From: Nathan Date: Sat, 7 Oct 2017 09:09:21 +0200 Subject: [DOCS] Write TextureButton, review and finish TextureProgress --- doc/classes/TextureButton.xml | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) (limited to 'doc/classes/TextureButton.xml') diff --git a/doc/classes/TextureButton.xml b/doc/classes/TextureButton.xml index e4f00555b..8e51548c1 100644 --- a/doc/classes/TextureButton.xml +++ b/doc/classes/TextureButton.xml @@ -1,11 +1,11 @@ - Button that can be themed with textures. + Texture-based button. Supports Pressed, Hover, Disabled and Focused states. - Button that can be themed with textures. This is like a regular [Button] but can be themed by assigning textures to it. This button is intended to be easy to theme, however a regular button can expand (that uses styleboxes) and still be better if the interface is expect to have internationalization of texts. - Only the normal texture is required, the others are optional. + [code]TextureButton[/code] has the same functionality as [Button], except it uses sprites instead of Godot's [Theme] resource. It is faster to create, but it doesn't support localization like more complex Controls. + The Normal state's texture is required. Others are optional. @@ -127,36 +127,51 @@ + If [code]true[/code] the texture stretches to the edges of the node's bounding rectangle using the [member stretch_mode]. If [code]false[/code] the texture will not scale with the node. Default value: [code]false[/code]. + Controls the texture's behavior when you resize the node's bounding rectangle, [b]only if[/b] [member expand] is [code]true[/code]. Set it to one of the [code]STRETCH_*[/code] constants. See the constants to learn more. + Pure black and white [Bitmap] image to use for click detection. On the mask, white pixels represent the button's clickable area. Use it to create buttons with curved shapes. + Texture to display when the node is disabled. See [member BaseButton.disabled]. + Texture to display when the node has mouse or keyboard focus. + Texture to display when the mouse hovers the node. + Texture to display by default, when the node is [b]not[/b] in the disabled, focused, hover or pressed state. + Texture to display on mouse down over the node, if the node has keyboard focus and the player presses the enter key or if the player presses the [member BaseButton.shortcut] key. + Scale to fit the node's bounding rectangle. + Tile inside the node's bounding rectangle. + The texture keeps its original size and stays in the bounding rectangle's top-left corner. + The texture keeps its original size and stays centered in the node's bounding rectangle. + Scale the texture to fit the node's bounding rectangle, but maintain the texture's aspect ratio. + Scale the texture to fit the node's bounding rectangle, center it, and maintain its aspect ratio. + Scale the texture so that the shorter side fits the bounding rectangle. The other side clips to the node's limits. -- cgit v1.2.3-70-g09d2