From dfb3386184ba581a789160cb9236fe5de8f8adc5 Mon Sep 17 00:00:00 2001 From: Nathan Date: Sat, 16 Sep 2017 11:54:44 +0200 Subject: Write TextureRect, Label and NinePatchRect --- doc/classes/Label.xml | 21 +++++++++++++++------ doc/classes/NinePatchRect.xml | 15 +++++++++++++++ doc/classes/TextureRect.xml | 18 +++++++++++++----- 3 files changed, 43 insertions(+), 11 deletions(-) (limited to 'doc') diff --git a/doc/classes/Label.xml b/doc/classes/Label.xml index 2e860aac0c..8c5e69b407 100644 --- a/doc/classes/Label.xml +++ b/doc/classes/Label.xml @@ -1,10 +1,10 @@ - Control that displays formatted text. + Displays plain text in a line or wrapped inside a rectangle. For formatted text, use [RichTextLabel]. - Label is a control that displays formatted text, optionally autowrapping it to the [Control] area. It inherits from range to be able to scroll wrapped text vertically. + Label displays plain text on the screen. It gives you control over the horizontal and vertical alignment, and can wrap the text inside the node's bounding rectangle. It doesn't support bold, italics or other formatting. For that, use [RichTextLabel] instead. @@ -22,14 +22,14 @@ - Return the amount of lines. + Returns the amount of lines of text the Label has. - Return the height of a line. + Returns the font size in pixels. @@ -98,14 +98,14 @@ - Return true if text would be cut off if it is too wide. + Return [code]true[/code] if text would be cut off if it is too wide. - Return true if text is displayed in all capitals. + Return [code]true[/code] if text is displayed in all capitals. @@ -201,22 +201,31 @@ + Controls the text's horizontal align. Supports left, center, right, and fill, or justify. Set it to one of the [code]ALIGN_*[/code] constants. + If [code]true[/code], wraps the text inside the node's bounding rectangle. If you resize the node, it will change its height automatically to show all the text. Default: false. + If [code]true[/code], the Label only shows the text that fits inside its bounding rectangle. It also lets you scale the node down freely. + The node ignores the first [code]lines_skipped[/code] lines before it starts to display text. + Limits the lines of text the node shows on screen. + Limits the count of visible characters. If you set [code]percent_visible[/code] to 50, only up to half of the text's characters will display on screen. Useful to animate the text in a dialog box. + The text to display on screen. + If [code]true[/code], all the text displays as UPPERCASE. + Controls the text's vertical align. Supports top, center, bottom, and fill. Set it to one of the [code]VALIGN_*[/code] constants. diff --git a/doc/classes/NinePatchRect.xml b/doc/classes/NinePatchRect.xml index 092e928ef9..6829b36e14 100644 --- a/doc/classes/NinePatchRect.xml +++ b/doc/classes/NinePatchRect.xml @@ -1,8 +1,10 @@ + Scalable texture-based frame that tiles the texture's centers and sides, but keeps the corners' original size. Perfect for panels and dialog boxes. + Better known as 9-slice panels, NinePatchRect produces clean panels of any size, based on a small texture. To do so, it splits the texture in a 3 by 3 grid. When you scale the node, it tiles the texture's sides horizontally or vertically, the center on both axes but it doesn't scale or tile the corners. @@ -100,36 +102,49 @@ + Doesn't do anything at the time of writing. + Doesn't do anything at the time of writing. + If [code]true[/code], draw the panel's center. Else, only draw the 9-slice's borders. Default value: [code]true[/code] + The height of the 9-slice's bottom row. A margin of 16 means the 9-slice's bottom corners and side will have a height of 16 pixels. You can set all 4 margin values indivually to create panels with non-uniform borders. + The height of the 9-slice's left column. + The height of the 9-slice's right column. + The height of the 9-slice's top row. + Rectangular region of the texture to sample from. If you're working with an atlas, use this property to define the area the 9-slice should use. All other properties are relative to this one. + The node's texture resource. + Fired when the node's texture changes. + Doesn't do anything at the time of writing. Default value for [code]axis_stretch_horizontal[/code] and [code]axis_stretch_vertical[/code]. + Doesn't do anything at the time of writing. + Doesn't do anything at the time of writing. diff --git a/doc/classes/TextureRect.xml b/doc/classes/TextureRect.xml index 6d137cb14c..af5626ae84 100644 --- a/doc/classes/TextureRect.xml +++ b/doc/classes/TextureRect.xml @@ -1,10 +1,10 @@ - Control that draws a texture. + Draws a sprite or a texture inside a User Interface. The texture can tile or not. - Control that draws a texture. + Use TextureRect to draw icons and sprites in your User Interfaces. To create panels and menu boxes, take a look at [NinePatchFrame]. Its Stretch Mode property controls the texture's scale and placement. It can scale, tile and stay centered inside its bounding rectangle. TextureRect is one of the 5 most common nodes to create game UI. @@ -56,31 +56,39 @@ - If [code]true[/code] texture will expand to fit. Default value: [code]false[/code]. + If [code]true[/code], the texture scales to fit its bounding rectangle. Default value: [code]false[/code]. - Stretch mode of the texture. Use STRETCH_* constants as value. + Controls the texture's behavior when you resize the node's bounding rectangle. Set it to one of the [code]STRETCH_*[/code] constants. See the constants to learn more. - The [Texture] resource for the node. + The node's [Texture] resource. + Scale to fit the node's bounding rectangle, only if [code]expand[/code] is [code]true[/code]. Default [code]stretch_mode[/code], for backwards compatibility. Until you set [code]expand[/code] to [code]true[/code], the texture will behave like [code]STRETCH_KEEP[/code]. + 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