summaryrefslogtreecommitdiffstats
path: root/doc/classes/ItemList.xml
diff options
context:
space:
mode:
authorHaSa1002 <johawitt@outlook.de>2020-10-31 00:37:55 +0100
committerHaSa1002 <johawitt@outlook.de>2020-11-25 22:15:13 +0100
commit5a01c2a3b0a055b1496f6f744c3faec23745cbc6 (patch)
tree1bb04e3738c2e44f10759ed1ee6ed0856a7ebde6 /doc/classes/ItemList.xml
parent91f7df2b4c178b7d897bd34615a0217b77394343 (diff)
downloadredot-engine-5a01c2a3b0a055b1496f6f744c3faec23745cbc6.tar.gz
Docs: Port Code Examples to C# (F, G, H, I, J, K, L)
Includes: * File * Geometry2D * HashingContext * HTTPClient * HTTPRequest * Image * Input * int * ItemList * JSONParseResult * KinematicBody2D * LineEdit Co-authored-by: Aaron Franke <arnfranke@yahoo.com>
Diffstat (limited to 'doc/classes/ItemList.xml')
-rw-r--r--doc/classes/ItemList.xml29
1 files changed, 20 insertions, 9 deletions
diff --git a/doc/classes/ItemList.xml b/doc/classes/ItemList.xml
index 25420bd77b..fd8bfb4ece 100644
--- a/doc/classes/ItemList.xml
+++ b/doc/classes/ItemList.xml
@@ -247,11 +247,16 @@
<argument index="1" name="custom_bg_color" type="Color">
</argument>
<description>
- 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]
+ [codeblocks]
+ [gdscript]
+ var itemList = ItemList.new()
+ some_string.set_item_custom_bg_color(0, Color.red) # This will set the background color of the first item of the control to red.
+ [/gdscript]
+ [csharp]
+ var itemList = new ItemList();
+ itemList.SetItemCustomBgColor(0, Colors.Red); // This will set the background color of the first item of the control to red.
+ [/csharp]
+ [/codeblocks]
</description>
</method>
<method name="set_item_custom_fg_color">
@@ -263,10 +268,16 @@
</argument>
<description>
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]
+ [codeblocks]
+ [gdscript]
+ var item_list = ItemList.new()
+ item_list.set_item_custom_fg_color(0, Color.red) # This will set the foreground color of the first item of the control to red.
+ [/gdscript]
+ [csharp]
+ var itemList = new ItemList();
+ itemList.SetItemCustomFgColor(0, Colors.Red); // This will set the foreground color of the first item of the control to red.
+ [/csharp]
+ [/codeblocks]
</description>
</method>
<method name="set_item_disabled">