diff options
Diffstat (limited to 'doc/classes/LineEdit.xml')
-rw-r--r-- | doc/classes/LineEdit.xml | 68 |
1 files changed, 36 insertions, 32 deletions
diff --git a/doc/classes/LineEdit.xml b/doc/classes/LineEdit.xml index bb180b591d..482ec28c56 100644 --- a/doc/classes/LineEdit.xml +++ b/doc/classes/LineEdit.xml @@ -54,7 +54,7 @@ <argument index="0" name="option" type="int"> </argument> <description> - Executes a given action as defined in the MENU_* enum. + Executes a given action as defined in the[code]MENU_*[/code] enum. </description> </method> <method name="select"> @@ -65,12 +65,12 @@ <argument index="1" name="to" type="int" default="-1"> </argument> <description> - Selects characters inside [LineEdit] between [code]from[/code] and [code]to[/code]. By default [code]from[/code] is at the beginning and [code]to[/code] at the end. + Selects characters inside [LineEdit] between [code]from[/code] and [code]to[/code]. By default, [code]from[/code] is at the beginning and [code]to[/code] at the end. [codeblock] text = "Welcome" - select() # Welcome - select(4) # ome - select(2, 5) # lco + select() # Will select "Welcome" + select(4) # Will select "ome" + select(2, 5) # Will select "lco" [/codeblock] </description> </method> @@ -83,49 +83,49 @@ </method> </methods> <members> - <member name="align" type="int" setter="set_align" getter="get_align" enum="LineEdit.Align"> - Text alignment as defined in the ALIGN_* enum. + <member name="align" type="int" setter="set_align" getter="get_align" enum="LineEdit.Align" default="0"> + Text alignment as defined in the [code]ALIGN_*[/code] enum. </member> - <member name="caret_blink" type="bool" setter="cursor_set_blink_enabled" getter="cursor_get_blink_enabled"> + <member name="caret_blink" type="bool" setter="cursor_set_blink_enabled" getter="cursor_get_blink_enabled" default="false"> If [code]true[/code], the caret (visual cursor) blinks. </member> - <member name="caret_blink_speed" type="float" setter="cursor_set_blink_speed" getter="cursor_get_blink_speed"> + <member name="caret_blink_speed" type="float" setter="cursor_set_blink_speed" getter="cursor_get_blink_speed" default="0.65"> Duration (in seconds) of a caret's blinking cycle. </member> - <member name="caret_position" type="int" setter="set_cursor_position" getter="get_cursor_position"> + <member name="caret_position" type="int" setter="set_cursor_position" getter="get_cursor_position" default="0"> The cursor's position inside the [LineEdit]. When set, the text may scroll to accommodate it. </member> - <member name="clear_button_enabled" type="bool" setter="set_clear_button_enabled" getter="is_clear_button_enabled"> + <member name="clear_button_enabled" type="bool" setter="set_clear_button_enabled" getter="is_clear_button_enabled" default="false"> If [code]true[/code], the [LineEdit] will show a clear button if [code]text[/code] is not empty. </member> - <member name="context_menu_enabled" type="bool" setter="set_context_menu_enabled" getter="is_context_menu_enabled"> - If [code]true[/code], the context menu will appear when right clicked. + <member name="context_menu_enabled" type="bool" setter="set_context_menu_enabled" getter="is_context_menu_enabled" default="true"> + If [code]true[/code], the context menu will appear when right-clicked. </member> - <member name="editable" type="bool" setter="set_editable" getter="is_editable"> + <member name="editable" type="bool" setter="set_editable" getter="is_editable" default="true"> If [code]false[/code], existing text cannot be modified and new text cannot be added. </member> - <member name="expand_to_text_length" type="bool" setter="set_expand_to_text_length" getter="get_expand_to_text_length"> + <member name="expand_to_text_length" type="bool" setter="set_expand_to_text_length" getter="get_expand_to_text_length" default="false"> If [code]true[/code], the [LineEdit] width will increase to stay longer than the [member text]. It will [b]not[/b] compress if the [member text] is shortened. </member> - <member name="focus_mode" type="int" setter="set_focus_mode" getter="get_focus_mode" enum="Control.FocusMode"> - Defines how the [LineEdit] can grab focus (Keyboard and mouse, only keyboard, or none). See [enum Control.FocusMode] in [Control] for details. + <member name="focus_mode" type="int" setter="set_focus_mode" getter="get_focus_mode" enum="Control.FocusMode" default="2"> + Defines how the [LineEdit] can grab focus (Keyboard and mouse, only keyboard, or none). See [enum Control.FocusMode] for details. </member> - <member name="max_length" type="int" setter="set_max_length" getter="get_max_length"> + <member name="max_length" type="int" setter="set_max_length" getter="get_max_length" default="0"> Maximum amount of characters that can be entered inside the [LineEdit]. If [code]0[/code], there is no limit. </member> - <member name="placeholder_alpha" type="float" setter="set_placeholder_alpha" getter="get_placeholder_alpha"> + <member name="placeholder_alpha" type="float" setter="set_placeholder_alpha" getter="get_placeholder_alpha" default="0.6"> Opacity of the [member placeholder_text]. From [code]0[/code] to [code]1[/code]. </member> - <member name="placeholder_text" type="String" setter="set_placeholder" getter="get_placeholder"> + <member name="placeholder_text" type="String" setter="set_placeholder" getter="get_placeholder" default=""""> Text shown when the [LineEdit] is empty. It is [b]not[/b] the [LineEdit]'s default value (see [member text]). </member> - <member name="secret" type="bool" setter="set_secret" getter="is_secret"> + <member name="secret" type="bool" setter="set_secret" getter="is_secret" default="false"> If [code]true[/code], every character is replaced with the secret character (see [member secret_character]). </member> - <member name="secret_character" type="String" setter="set_secret_character" getter="get_secret_character"> + <member name="secret_character" type="String" setter="set_secret_character" getter="get_secret_character" default=""*""> The character to use to mask secret input (defaults to "*"). Only a single character can be used as the secret character. </member> - <member name="text" type="String" setter="set_text" getter="get_text"> + <member name="text" type="String" setter="set_text" getter="get_text" default=""""> String value of the [LineEdit]. </member> </members> @@ -147,13 +147,13 @@ </signals> <constants> <constant name="ALIGN_LEFT" value="0" enum="Align"> - Aligns the text on the left hand side of the [LineEdit]. + Aligns the text on the left-hand side of the [LineEdit]. </constant> <constant name="ALIGN_CENTER" value="1" enum="Align"> Centers the text in the middle of the [LineEdit]. </constant> <constant name="ALIGN_RIGHT" value="2" enum="Align"> - Aligns the text on the right hand side of the [LineEdit]. + Aligns the text on the right-hand side of the [LineEdit]. </constant> <constant name="ALIGN_FILL" value="3" enum="Align"> Stretches whitespaces to fit the [LineEdit]'s width. @@ -166,6 +166,7 @@ </constant> <constant name="MENU_PASTE" value="2" enum="MenuItems"> Pastes the clipboard text over the selected text (or at the cursor's position). + Non-printable escape characters are automatically stripped from the OS clipboard via [method String.strip_escapes]. </constant> <constant name="MENU_CLEAR" value="3" enum="MenuItems"> Erases the whole [LineEdit] text. @@ -180,32 +181,35 @@ Reverse the last undo action. </constant> <constant name="MENU_MAX" value="7" enum="MenuItems"> + Represents the size of the [enum MenuItems] enum. </constant> </constants> <theme_items> <theme_item name="clear" type="Texture"> </theme_item> - <theme_item name="clear_button_color" type="Color"> + <theme_item name="clear_button_color" type="Color" default="Color( 0.878431, 0.878431, 0.878431, 1 )"> </theme_item> - <theme_item name="clear_button_color_pressed" type="Color"> + <theme_item name="clear_button_color_pressed" type="Color" default="Color( 1, 1, 1, 1 )"> </theme_item> - <theme_item name="cursor_color" type="Color"> + <theme_item name="cursor_color" type="Color" default="Color( 0.941176, 0.941176, 0.941176, 1 )"> </theme_item> <theme_item name="focus" type="StyleBox"> </theme_item> <theme_item name="font" type="Font"> </theme_item> - <theme_item name="font_color" type="Color"> + <theme_item name="font_color" type="Color" default="Color( 0.878431, 0.878431, 0.878431, 1 )"> </theme_item> - <theme_item name="font_color_selected" type="Color"> + <theme_item name="font_color_selected" type="Color" default="Color( 0, 0, 0, 1 )"> </theme_item> - <theme_item name="minimum_spaces" type="int"> + <theme_item name="font_color_uneditable" type="Color" default="Color( 0.878431, 0.878431, 0.878431, 0.5 )"> + </theme_item> + <theme_item name="minimum_spaces" type="int" default="12"> </theme_item> <theme_item name="normal" type="StyleBox"> </theme_item> <theme_item name="read_only" type="StyleBox"> </theme_item> - <theme_item name="selection_color" type="Color"> + <theme_item name="selection_color" type="Color" default="Color( 0.490196, 0.490196, 0.490196, 1 )"> </theme_item> </theme_items> </class> |