From 49df253627088f6de4c06c5950d8733818fefb2e Mon Sep 17 00:00:00 2001 From: Zak Date: Tue, 11 Jun 2019 12:51:50 +0300 Subject: Document ItemList control --- doc/classes/ItemList.xml | 78 ++++++++++++++++++++++++++++++++---------------- 1 file changed, 52 insertions(+), 26 deletions(-) (limited to 'doc/classes') diff --git a/doc/classes/ItemList.xml b/doc/classes/ItemList.xml index ba3a7fe6d8..f86897a6f0 100644 --- a/doc/classes/ItemList.xml +++ b/doc/classes/ItemList.xml @@ -46,7 +46,7 @@ - Ensure selection is visible, adjusting the scroll position as necessary. + Ensure current selection is visible, adjusting the scroll position as necessary. @@ -64,7 +64,7 @@ - Returns count of items currently in the item list. + Returns the number of items currently in the list. @@ -73,6 +73,7 @@ + Returns the [Color] set by [member set_custom_bg_color]. Default value is [code]Color(0, 0, 0, 0)[/code]. @@ -81,6 +82,7 @@ + Returns the [Color] set by [member set_custom_fg_color]. Default value is [code]Color(0, 0, 0, 0)[/code]. @@ -89,6 +91,7 @@ + Returns the icon associated with the specified index. Default value is [code]null[/code] @@ -114,6 +117,7 @@ + Returns the metadata value of the specified index set by [member set_item_metadata]. @@ -122,7 +126,7 @@ - Returns the text for specified item index. + Returns the text associated with the specified index. @@ -131,21 +135,21 @@ - Returns tooltip hint for specified item index. + Returns the tooltip hint associated with the specified index. - Returns the list of selected indexes. + Returns an array with the indexes of the selected items. - Returns the current vertical scroll bar for the List. + Returns the [Object] ID associated with the list. @@ -161,7 +165,7 @@ - Returns whether or not the item at the specified index is disabled + Returns whether or not the item at the specified index is disabled. @@ -207,7 +211,7 @@ - Moves item at index [code]from_idx[/code] to [code]to_idx[/code]. + Moves item from index [code]from_idx[/code] to [code]to_idx[/code]. @@ -216,7 +220,7 @@ - Remove item at specified index from the list. + Removes the item specified by [code]idx[/code] index from the list. @@ -239,6 +243,11 @@ + Sets the background color of the item specified by [code]idx[/code] index to the specified [Color]. + [codeblock] + var some_string = "Some text" + some_string.set_item_custom_bg_color(0,Color(1, 0, 0, 1) # This will set the background color of the first item of the control to red. + [/codeblock] @@ -249,6 +258,11 @@ + Sets the foreground color of the item specified by [code]idx[/code] index to the specified [Color]. + [codeblock] + var some_string = "Some text" + some_string.set_item_custom_fg_color(0,Color(1, 0, 0, 1) # This will set the foreground color of the first item of the control to red. + [/codeblock] @@ -259,8 +273,8 @@ - Disable (or enable) item at specified index. - Disabled items are not be selectable and do not fire activation (Enter or double-click) signals. + Disable (or enable) item at the specified index. + Disabled items are not be selectable and do not trigger activation (Enter or double-click) signals. @@ -271,7 +285,7 @@ - Set (or replace) icon of the item at the specified index. + Set (or replace) the icon's [Texture] associated with the specified index. @@ -282,7 +296,7 @@ - Sets a modulating [Color] for item's icon at the specified index. + Sets a modulating [Color] of the item associated with the specified index. @@ -313,7 +327,7 @@ - Sets a value (of any type) to be stored with the item at the specified index. + Sets a value (of any type) to be stored with the item associated with the specified index. @@ -324,7 +338,7 @@ - Allow or disallow selection of the item at the specified index. + Allow or disallow selection of the item associated with the specified index. @@ -335,7 +349,7 @@ - Sets text of item at specified index. + Sets text of the item associated with the specified index. @@ -346,7 +360,7 @@ - Sets tooltip hint for item at specified index. + Sets tooltip hint for the item associated with the specified index. @@ -357,7 +371,7 @@ - Sets whether the tooltip is enabled for specified item index. + Sets whether the tooltip hint is enabled for specified item index. @@ -373,7 +387,7 @@ - Ensure item at specified index is not selected. + Ensure the item associated with the specified index is not selected. @@ -386,29 +400,38 @@ - If [code]true[/code], the currently selected item may be selected again. + If [code]true[/code], the currently selected item can be selected again. - If [code]true[/code], a right mouse button click can select items. + If [code]true[/code], right mouse button click can select items. + If [code]true[/code], the control will automatically resize the height to fit its content. + Sets the default column width in pixels. + If left to default value, each item will have a width equal to the width of its content and the columns will have an uneven width. + Sets the default icon size in pixels. + Sets the default position of the icon to either [const ICON_MODE_LEFT] or [const ICON_MODE_TOP]. + Sets the icon size to its initial size multiplied by the specified scale. Default value is 1.0. + Sets the maximum columns the list will have. + If set to anything other than the default, the content will be split among the specified columns. + If set to [code]true[/code], all columns will have the same width specified by [member fixed_column_width]. - Allow single or multiple selection. See the [code]SELECT_*[/code] constants. + Allow single or multiple item selection. See the [code]SELECT_*[/code] constants. @@ -416,7 +439,7 @@ - Fired when specified list item is activated via double click or Enter. + Triggered when specified list item is activated via double click or Enter. @@ -425,7 +448,7 @@ - Fired when specified list item has been selected via right mouse clicking. + Triggered when specified list item has been selected via right mouse clicking. The click position is also provided to allow appropriate popup of context menus at the correct location. [member allow_rmb_select] must be enabled. @@ -435,7 +458,7 @@ - Fired when specified item has been selected. + Triggered when specified item has been selected. [member allow_reselect] must be enabled to reselect an item. @@ -445,17 +468,20 @@ - Fired when a multiple selection is altered on a list allowing multiple selection. + Triggered when a multiple selection is altered on a list allowing multiple selection. + Triggered when a left mouse click is issued within the rect of the list but on empty space. + Triggered when a right mouse click is issued within the rect of the list but on empty space. + [member allow_rmb_select] must be enabled. -- cgit v1.2.3