diff options
-rw-r--r-- | doc/classes/Button.xml | 4 | ||||
-rw-r--r-- | doc/classes/CheckBox.xml | 4 | ||||
-rw-r--r-- | doc/classes/CheckButton.xml | 4 | ||||
-rw-r--r-- | doc/classes/ItemList.xml | 2 | ||||
-rw-r--r-- | doc/classes/LineEdit.xml | 10 | ||||
-rw-r--r-- | doc/classes/LinkButton.xml | 4 | ||||
-rw-r--r-- | doc/classes/MenuButton.xml | 4 | ||||
-rw-r--r-- | doc/classes/OptionButton.xml | 4 | ||||
-rw-r--r-- | doc/classes/PopupMenu.xml | 4 | ||||
-rw-r--r-- | doc/classes/ProgressBar.xml | 2 | ||||
-rw-r--r-- | doc/classes/ProjectSettings.xml | 4 | ||||
-rw-r--r-- | doc/classes/RichTextLabel.xml | 2 | ||||
-rw-r--r-- | doc/classes/TabContainer.xml | 4 | ||||
-rw-r--r-- | doc/classes/Tabs.xml | 4 | ||||
-rw-r--r-- | doc/classes/TextEdit.xml | 30 | ||||
-rw-r--r-- | doc/classes/ToolButton.xml | 4 | ||||
-rw-r--r-- | doc/classes/Tree.xml | 8 | ||||
-rw-r--r-- | doc/classes/TreeItem.xml | 12 | ||||
-rw-r--r-- | scene/gui/tree.cpp | 33 | ||||
-rw-r--r-- | scene/gui/tree.h | 4 |
20 files changed, 82 insertions, 65 deletions
diff --git a/doc/classes/Button.xml b/doc/classes/Button.xml index 3d8730b588..f92cf8fabc 100644 --- a/doc/classes/Button.xml +++ b/doc/classes/Button.xml @@ -45,11 +45,11 @@ </theme_item> <theme_item name="font" type="Font"> </theme_item> - <theme_item name="font_color" type="Color" default="Color( 0.878431, 0.878431, 0.878431, 1 )"> + <theme_item name="font_color" type="Color" default="Color( 0.88, 0.88, 0.88, 1 )"> </theme_item> <theme_item name="font_color_disabled" type="Color" default="Color( 0.9, 0.9, 0.9, 0.2 )"> </theme_item> - <theme_item name="font_color_hover" type="Color" default="Color( 0.941176, 0.941176, 0.941176, 1 )"> + <theme_item name="font_color_hover" type="Color" default="Color( 0.94, 0.94, 0.94, 1 )"> </theme_item> <theme_item name="font_color_pressed" type="Color" default="Color( 1, 1, 1, 1 )"> </theme_item> diff --git a/doc/classes/CheckBox.xml b/doc/classes/CheckBox.xml index 5583775f95..80b5e90717 100644 --- a/doc/classes/CheckBox.xml +++ b/doc/classes/CheckBox.xml @@ -23,11 +23,11 @@ </theme_item> <theme_item name="font" type="Font"> </theme_item> - <theme_item name="font_color" type="Color" default="Color( 0.878431, 0.878431, 0.878431, 1 )"> + <theme_item name="font_color" type="Color" default="Color( 0.88, 0.88, 0.88, 1 )"> </theme_item> <theme_item name="font_color_disabled" type="Color" default="Color( 0.9, 0.9, 0.9, 0.2 )"> </theme_item> - <theme_item name="font_color_hover" type="Color" default="Color( 0.941176, 0.941176, 0.941176, 1 )"> + <theme_item name="font_color_hover" type="Color" default="Color( 0.94, 0.94, 0.94, 1 )"> </theme_item> <theme_item name="font_color_hover_pressed" type="Color" default="Color( 1, 1, 1, 1 )"> </theme_item> diff --git a/doc/classes/CheckButton.xml b/doc/classes/CheckButton.xml index daed9128a9..f4d0e0657b 100644 --- a/doc/classes/CheckButton.xml +++ b/doc/classes/CheckButton.xml @@ -21,11 +21,11 @@ </theme_item> <theme_item name="font" type="Font"> </theme_item> - <theme_item name="font_color" type="Color" default="Color( 0.878431, 0.878431, 0.878431, 1 )"> + <theme_item name="font_color" type="Color" default="Color( 0.88, 0.88, 0.88, 1 )"> </theme_item> <theme_item name="font_color_disabled" type="Color" default="Color( 0.9, 0.9, 0.9, 0.2 )"> </theme_item> - <theme_item name="font_color_hover" type="Color" default="Color( 0.941176, 0.941176, 0.941176, 1 )"> + <theme_item name="font_color_hover" type="Color" default="Color( 0.94, 0.94, 0.94, 1 )"> </theme_item> <theme_item name="font_color_hover_pressed" type="Color" default="Color( 1, 1, 1, 1 )"> </theme_item> diff --git a/doc/classes/ItemList.xml b/doc/classes/ItemList.xml index 95c0e663ce..8515d1063d 100644 --- a/doc/classes/ItemList.xml +++ b/doc/classes/ItemList.xml @@ -505,7 +505,7 @@ </theme_item> <theme_item name="font" type="Font"> </theme_item> - <theme_item name="font_color" type="Color" default="Color( 0.627451, 0.627451, 0.627451, 1 )"> + <theme_item name="font_color" type="Color" default="Color( 0.63, 0.63, 0.63, 1 )"> </theme_item> <theme_item name="font_color_selected" type="Color" default="Color( 1, 1, 1, 1 )"> </theme_item> diff --git a/doc/classes/LineEdit.xml b/doc/classes/LineEdit.xml index 482ec28c56..d90a290fdc 100644 --- a/doc/classes/LineEdit.xml +++ b/doc/classes/LineEdit.xml @@ -187,21 +187,21 @@ <theme_items> <theme_item name="clear" type="Texture"> </theme_item> - <theme_item name="clear_button_color" type="Color" default="Color( 0.878431, 0.878431, 0.878431, 1 )"> + <theme_item name="clear_button_color" type="Color" default="Color( 0.88, 0.88, 0.88, 1 )"> </theme_item> <theme_item name="clear_button_color_pressed" type="Color" default="Color( 1, 1, 1, 1 )"> </theme_item> - <theme_item name="cursor_color" type="Color" default="Color( 0.941176, 0.941176, 0.941176, 1 )"> + <theme_item name="cursor_color" type="Color" default="Color( 0.94, 0.94, 0.94, 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" default="Color( 0.878431, 0.878431, 0.878431, 1 )"> + <theme_item name="font_color" type="Color" default="Color( 0.88, 0.88, 0.88, 1 )"> </theme_item> <theme_item name="font_color_selected" type="Color" default="Color( 0, 0, 0, 1 )"> </theme_item> - <theme_item name="font_color_uneditable" type="Color" default="Color( 0.878431, 0.878431, 0.878431, 0.5 )"> + <theme_item name="font_color_uneditable" type="Color" default="Color( 0.88, 0.88, 0.88, 0.5 )"> </theme_item> <theme_item name="minimum_spaces" type="int" default="12"> </theme_item> @@ -209,7 +209,7 @@ </theme_item> <theme_item name="read_only" type="StyleBox"> </theme_item> - <theme_item name="selection_color" type="Color" default="Color( 0.490196, 0.490196, 0.490196, 1 )"> + <theme_item name="selection_color" type="Color" default="Color( 0.49, 0.49, 0.49, 1 )"> </theme_item> </theme_items> </class> diff --git a/doc/classes/LinkButton.xml b/doc/classes/LinkButton.xml index 5dfb55a8dd..3e6b5e8c1a 100644 --- a/doc/classes/LinkButton.xml +++ b/doc/classes/LinkButton.xml @@ -32,9 +32,9 @@ </theme_item> <theme_item name="font" type="Font"> </theme_item> - <theme_item name="font_color" type="Color" default="Color( 0.878431, 0.878431, 0.878431, 1 )"> + <theme_item name="font_color" type="Color" default="Color( 0.88, 0.88, 0.88, 1 )"> </theme_item> - <theme_item name="font_color_hover" type="Color" default="Color( 0.941176, 0.941176, 0.941176, 1 )"> + <theme_item name="font_color_hover" type="Color" default="Color( 0.94, 0.94, 0.94, 1 )"> </theme_item> <theme_item name="font_color_pressed" type="Color" default="Color( 1, 1, 1, 1 )"> </theme_item> diff --git a/doc/classes/MenuButton.xml b/doc/classes/MenuButton.xml index 609bf6317a..40d2160baa 100644 --- a/doc/classes/MenuButton.xml +++ b/doc/classes/MenuButton.xml @@ -46,11 +46,11 @@ </theme_item> <theme_item name="font" type="Font"> </theme_item> - <theme_item name="font_color" type="Color" default="Color( 0.878431, 0.878431, 0.878431, 1 )"> + <theme_item name="font_color" type="Color" default="Color( 0.88, 0.88, 0.88, 1 )"> </theme_item> <theme_item name="font_color_disabled" type="Color" default="Color( 1, 1, 1, 0.3 )"> </theme_item> - <theme_item name="font_color_hover" type="Color" default="Color( 0.941176, 0.941176, 0.941176, 1 )"> + <theme_item name="font_color_hover" type="Color" default="Color( 0.94, 0.94, 0.94, 1 )"> </theme_item> <theme_item name="font_color_pressed" type="Color" default="Color( 1, 1, 1, 1 )"> </theme_item> diff --git a/doc/classes/OptionButton.xml b/doc/classes/OptionButton.xml index c44495ead9..0c2566e845 100644 --- a/doc/classes/OptionButton.xml +++ b/doc/classes/OptionButton.xml @@ -229,11 +229,11 @@ </theme_item> <theme_item name="font" type="Font"> </theme_item> - <theme_item name="font_color" type="Color" default="Color( 0.878431, 0.878431, 0.878431, 1 )"> + <theme_item name="font_color" type="Color" default="Color( 0.88, 0.88, 0.88, 1 )"> </theme_item> <theme_item name="font_color_disabled" type="Color" default="Color( 0.9, 0.9, 0.9, 0.2 )"> </theme_item> - <theme_item name="font_color_hover" type="Color" default="Color( 0.941176, 0.941176, 0.941176, 1 )"> + <theme_item name="font_color_hover" type="Color" default="Color( 0.94, 0.94, 0.94, 1 )"> </theme_item> <theme_item name="font_color_pressed" type="Color" default="Color( 1, 1, 1, 1 )"> </theme_item> diff --git a/doc/classes/PopupMenu.xml b/doc/classes/PopupMenu.xml index a05aff9a59..3d6693da15 100644 --- a/doc/classes/PopupMenu.xml +++ b/doc/classes/PopupMenu.xml @@ -598,7 +598,7 @@ <theme_item name="font" type="Font"> Sets a custom [Font]. </theme_item> - <theme_item name="font_color" type="Color" default="Color( 0.878431, 0.878431, 0.878431, 1 )"> + <theme_item name="font_color" type="Color" default="Color( 0.88, 0.88, 0.88, 1 )"> Sets a custom [Color] for the [Font]. </theme_item> <theme_item name="font_color_accel" type="Color" default="Color( 0.7, 0.7, 0.7, 0.8 )"> @@ -606,7 +606,7 @@ <theme_item name="font_color_disabled" type="Color" default="Color( 0.4, 0.4, 0.4, 0.8 )"> Sets a custom [Color] for disabled text. </theme_item> - <theme_item name="font_color_hover" type="Color" default="Color( 0.878431, 0.878431, 0.878431, 1 )"> + <theme_item name="font_color_hover" type="Color" default="Color( 0.88, 0.88, 0.88, 1 )"> Sets a custom [Color] for the hovered text. </theme_item> <theme_item name="hover" type="StyleBox"> diff --git a/doc/classes/ProgressBar.xml b/doc/classes/ProgressBar.xml index a8168958cf..96d377fd5e 100644 --- a/doc/classes/ProgressBar.xml +++ b/doc/classes/ProgressBar.xml @@ -24,7 +24,7 @@ </theme_item> <theme_item name="font" type="Font"> </theme_item> - <theme_item name="font_color" type="Color" default="Color( 0.941176, 0.941176, 0.941176, 1 )"> + <theme_item name="font_color" type="Color" default="Color( 0.94, 0.94, 0.94, 1 )"> </theme_item> <theme_item name="font_color_shadow" type="Color" default="Color( 0, 0, 0, 1 )"> </theme_item> diff --git a/doc/classes/ProjectSettings.xml b/doc/classes/ProjectSettings.xml index 3e9e063c0c..22dae4fe71 100644 --- a/doc/classes/ProjectSettings.xml +++ b/doc/classes/ProjectSettings.xml @@ -164,7 +164,7 @@ <member name="android/modules" type="String" setter="" getter="" default=""""> Comma-separated list of custom Android modules (which must have been built in the Android export templates) using their Java package path, e.g. [code]org/godotengine/org/GodotPaymentV3,org/godotengine/godot/MyCustomSingleton"[/code]. </member> - <member name="application/boot_splash/bg_color" type="Color" setter="" getter="" default="Color( 0.137255, 0.137255, 0.137255, 1 )"> + <member name="application/boot_splash/bg_color" type="Color" setter="" getter="" default="Color( 0.14, 0.14, 0.14, 1 )"> Background color for the boot splash. </member> <member name="application/boot_splash/fullsize" type="bool" setter="" getter="" default="true"> @@ -720,6 +720,8 @@ <member name="network/limits/packet_peer_stream/max_buffer_po2" type="int" setter="" getter="" default="16"> Default size of packet peer stream for deserializing Godot data. Over this size, data is dropped. </member> + <member name="network/limits/tcp/connect_timeout_seconds" type="int" setter="" getter="" default="30"> + </member> <member name="network/limits/websocket_client/max_in_buffer_kb" type="int" setter="" getter="" default="64"> </member> <member name="network/limits/websocket_client/max_in_packets" type="int" setter="" getter="" default="1024"> diff --git a/doc/classes/RichTextLabel.xml b/doc/classes/RichTextLabel.xml index 405eb59563..81f5f44866 100644 --- a/doc/classes/RichTextLabel.xml +++ b/doc/classes/RichTextLabel.xml @@ -331,7 +331,7 @@ </theme_item> <theme_item name="focus" type="StyleBox"> </theme_item> - <theme_item name="font_color_selected" type="Color" default="Color( 0.490196, 0.490196, 0.490196, 1 )"> + <theme_item name="font_color_selected" type="Color" default="Color( 0.49, 0.49, 0.49, 1 )"> </theme_item> <theme_item name="font_color_shadow" type="Color" default="Color( 0, 0, 0, 0 )"> </theme_item> diff --git a/doc/classes/TabContainer.xml b/doc/classes/TabContainer.xml index 2eb8411078..22b009a15a 100644 --- a/doc/classes/TabContainer.xml +++ b/doc/classes/TabContainer.xml @@ -189,11 +189,11 @@ </theme_item> <theme_item name="font" type="Font"> </theme_item> - <theme_item name="font_color_bg" type="Color" default="Color( 0.690196, 0.690196, 0.690196, 1 )"> + <theme_item name="font_color_bg" type="Color" default="Color( 0.69, 0.69, 0.69, 1 )"> </theme_item> <theme_item name="font_color_disabled" type="Color" default="Color( 0.9, 0.9, 0.9, 0.2 )"> </theme_item> - <theme_item name="font_color_fg" type="Color" default="Color( 0.941176, 0.941176, 0.941176, 1 )"> + <theme_item name="font_color_fg" type="Color" default="Color( 0.94, 0.94, 0.94, 1 )"> </theme_item> <theme_item name="hseparation" type="int" default="4"> </theme_item> diff --git a/doc/classes/Tabs.xml b/doc/classes/Tabs.xml index b6d702ba45..6bd7b8c2c3 100644 --- a/doc/classes/Tabs.xml +++ b/doc/classes/Tabs.xml @@ -260,11 +260,11 @@ </theme_item> <theme_item name="font" type="Font"> </theme_item> - <theme_item name="font_color_bg" type="Color" default="Color( 0.690196, 0.690196, 0.690196, 1 )"> + <theme_item name="font_color_bg" type="Color" default="Color( 0.69, 0.69, 0.69, 1 )"> </theme_item> <theme_item name="font_color_disabled" type="Color" default="Color( 0.9, 0.9, 0.9, 0.2 )"> </theme_item> - <theme_item name="font_color_fg" type="Color" default="Color( 0.941176, 0.941176, 0.941176, 1 )"> + <theme_item name="font_color_fg" type="Color" default="Color( 0.94, 0.94, 0.94, 1 )"> </theme_item> <theme_item name="hseparation" type="int" default="4"> </theme_item> diff --git a/doc/classes/TextEdit.xml b/doc/classes/TextEdit.xml index e665178809..22c769330d 100644 --- a/doc/classes/TextEdit.xml +++ b/doc/classes/TextEdit.xml @@ -520,7 +520,7 @@ </constant> </constants> <theme_items> - <theme_item name="background_color" type="Color" default="Color( 0, 0, 0, 0 )"> + <theme_item name="background_color" type="Color" default="Color( 0, 0, 0, 1 )"> Sets the background [Color] of this [TextEdit]. [member syntax_highlighting] has to be enabled. </theme_item> <theme_item name="bookmark_color" type="Color" default="Color( 0.08, 0.49, 0.98, 1 )"> @@ -533,17 +533,17 @@ </theme_item> <theme_item name="caret_background_color" type="Color" default="Color( 0, 0, 0, 1 )"> </theme_item> - <theme_item name="caret_color" type="Color" default="Color( 0.878431, 0.878431, 0.878431, 1 )"> + <theme_item name="caret_color" type="Color" default="Color( 0.88, 0.88, 0.88, 1 )"> </theme_item> <theme_item name="code_folding_color" type="Color" default="Color( 0.8, 0.8, 0.8, 0.8 )"> </theme_item> <theme_item name="completion" type="StyleBox"> </theme_item> - <theme_item name="completion_background_color" type="Color" default="Color( 0.172549, 0.164706, 0.196078, 1 )"> + <theme_item name="completion_background_color" type="Color" default="Color( 0.17, 0.16, 0.2, 1 )"> </theme_item> - <theme_item name="completion_existing_color" type="Color" default="Color( 0.87451, 0.87451, 0.87451, 0.129412 )"> + <theme_item name="completion_existing_color" type="Color" default="Color( 0.87, 0.87, 0.87, 0.13 )"> </theme_item> - <theme_item name="completion_font_color" type="Color" default="Color( 0.666667, 0.666667, 0.666667, 1 )"> + <theme_item name="completion_font_color" type="Color" default="Color( 0.67, 0.67, 0.67, 1 )"> </theme_item> <theme_item name="completion_lines" type="int" default="7"> </theme_item> @@ -553,7 +553,7 @@ </theme_item> <theme_item name="completion_scroll_width" type="int" default="3"> </theme_item> - <theme_item name="completion_selected_color" type="Color" default="Color( 0.262745, 0.258824, 0.266667, 1 )"> + <theme_item name="completion_selected_color" type="Color" default="Color( 0.26, 0.26, 0.27, 1 )"> </theme_item> <theme_item name="current_line_color" type="Color" default="Color( 0.25, 0.25, 0.26, 0.8 )"> Sets the [Color] of the breakpoints. [member breakpoint_gutter] has to be enabled. @@ -569,16 +569,16 @@ <theme_item name="font" type="Font"> Sets the default [Font]. </theme_item> - <theme_item name="font_color" type="Color" default="Color( 0.878431, 0.878431, 0.878431, 1 )"> + <theme_item name="font_color" type="Color" default="Color( 0.88, 0.88, 0.88, 1 )"> Sets the font [Color]. </theme_item> - <theme_item name="font_color_readonly" type="Color" default="Color( 0.878431, 0.878431, 0.878431, 0.5 )"> + <theme_item name="font_color_readonly" type="Color" default="Color( 0.88, 0.88, 0.88, 0.5 )"> </theme_item> <theme_item name="font_color_selected" type="Color" default="Color( 0, 0, 0, 1 )"> </theme_item> - <theme_item name="function_color" type="Color" default="Color( 0.4, 0.635294, 0.807843, 1 )"> + <theme_item name="function_color" type="Color" default="Color( 0.4, 0.64, 0.81, 1 )"> </theme_item> - <theme_item name="line_number_color" type="Color" default="Color( 0.666667, 0.666667, 0.666667, 0.4 )"> + <theme_item name="line_number_color" type="Color" default="Color( 0.67, 0.67, 0.67, 0.4 )"> Sets the [Color] of the line numbers. [member show_line_numbers] has to be enabled. </theme_item> <theme_item name="line_spacing" type="int" default="4"> @@ -587,24 +587,24 @@ <theme_item name="mark_color" type="Color" default="Color( 1, 0.4, 0.4, 0.4 )"> Sets the [Color] of marked text. </theme_item> - <theme_item name="member_variable_color" type="Color" default="Color( 0.901961, 0.305882, 0.34902, 1 )"> + <theme_item name="member_variable_color" type="Color" default="Color( 0.9, 0.31, 0.35, 1 )"> </theme_item> <theme_item name="normal" type="StyleBox"> Sets the [StyleBox] of this [TextEdit]. </theme_item> - <theme_item name="number_color" type="Color" default="Color( 0.921569, 0.584314, 0.196078, 1 )"> + <theme_item name="number_color" type="Color" default="Color( 0.92, 0.58, 0.2, 1 )"> </theme_item> <theme_item name="read_only" type="StyleBox"> Sets the [StyleBox] of this [TextEdit] when [member readonly] is enabled. </theme_item> - <theme_item name="safe_line_number_color" type="Color" default="Color( 0.666667, 0.784314, 0.666667, 0.6 )"> + <theme_item name="safe_line_number_color" type="Color" default="Color( 0.67, 0.78, 0.67, 0.6 )"> </theme_item> - <theme_item name="selection_color" type="Color" default="Color( 0.490196, 0.490196, 0.490196, 1 )"> + <theme_item name="selection_color" type="Color" default="Color( 0.49, 0.49, 0.49, 1 )"> Sets the highlight [Color] of text selections. </theme_item> <theme_item name="space" type="Texture"> </theme_item> - <theme_item name="symbol_color" type="Color" default="Color( 0.941176, 0.941176, 0.941176, 1 )"> + <theme_item name="symbol_color" type="Color" default="Color( 0.94, 0.94, 0.94, 1 )"> </theme_item> <theme_item name="tab" type="Texture"> Sets a custom [Texture] for tab text characters. diff --git a/doc/classes/ToolButton.xml b/doc/classes/ToolButton.xml index 3511987474..f617c2a94f 100644 --- a/doc/classes/ToolButton.xml +++ b/doc/classes/ToolButton.xml @@ -23,11 +23,11 @@ </theme_item> <theme_item name="font" type="Font"> </theme_item> - <theme_item name="font_color" type="Color" default="Color( 0.878431, 0.878431, 0.878431, 1 )"> + <theme_item name="font_color" type="Color" default="Color( 0.88, 0.88, 0.88, 1 )"> </theme_item> <theme_item name="font_color_disabled" type="Color" default="Color( 0.9, 0.95, 1, 0.3 )"> </theme_item> - <theme_item name="font_color_hover" type="Color" default="Color( 0.941176, 0.941176, 0.941176, 1 )"> + <theme_item name="font_color_hover" type="Color" default="Color( 0.94, 0.94, 0.94, 1 )"> </theme_item> <theme_item name="font_color_pressed" type="Color" default="Color( 1, 1, 1, 1 )"> </theme_item> diff --git a/doc/classes/Tree.xml b/doc/classes/Tree.xml index 416a9eb656..22c74d4ca5 100644 --- a/doc/classes/Tree.xml +++ b/doc/classes/Tree.xml @@ -382,7 +382,7 @@ </theme_item> <theme_item name="custom_button" type="StyleBox"> </theme_item> - <theme_item name="custom_button_font_highlight" type="Color" default="Color( 0.941176, 0.941176, 0.941176, 1 )"> + <theme_item name="custom_button_font_highlight" type="Color" default="Color( 0.94, 0.94, 0.94, 1 )"> </theme_item> <theme_item name="custom_button_hover" type="StyleBox"> </theme_item> @@ -396,7 +396,7 @@ </theme_item> <theme_item name="font" type="Font"> </theme_item> - <theme_item name="font_color" type="Color" default="Color( 0.690196, 0.690196, 0.690196, 1 )"> + <theme_item name="font_color" type="Color" default="Color( 0.69, 0.69, 0.69, 1 )"> </theme_item> <theme_item name="font_color_selected" type="Color" default="Color( 1, 1, 1, 1 )"> </theme_item> @@ -408,7 +408,7 @@ </theme_item> <theme_item name="item_margin" type="int" default="12"> </theme_item> - <theme_item name="relationship_line_color" type="Color" default="Color( 0.27451, 0.27451, 0.27451, 1 )"> + <theme_item name="relationship_line_color" type="Color" default="Color( 0.27, 0.27, 0.27, 1 )"> </theme_item> <theme_item name="scroll_border" type="int" default="4"> </theme_item> @@ -422,7 +422,7 @@ </theme_item> <theme_item name="selection_color" type="Color" default="Color( 0.1, 0.1, 1, 0.8 )"> </theme_item> - <theme_item name="title_button_color" type="Color" default="Color( 0.878431, 0.878431, 0.878431, 1 )"> + <theme_item name="title_button_color" type="Color" default="Color( 0.88, 0.88, 0.88, 1 )"> </theme_item> <theme_item name="title_button_font" type="Font"> </theme_item> diff --git a/doc/classes/TreeItem.xml b/doc/classes/TreeItem.xml index d9c7013d34..3a4acb351d 100644 --- a/doc/classes/TreeItem.xml +++ b/doc/classes/TreeItem.xml @@ -337,6 +337,18 @@ Sets the given column's button [Texture] at index [code]button_idx[/code] to [code]button[/code]. </description> </method> + <method name="set_button_disabled"> + <return type="void"> + </return> + <argument index="0" name="column" type="int"> + </argument> + <argument index="1" name="button_idx" type="int"> + </argument> + <argument index="2" name="disabled" type="bool"> + </argument> + <description> + </description> + </method> <method name="set_cell_mode"> <return type="void"> </return> diff --git a/scene/gui/tree.cpp b/scene/gui/tree.cpp index 8624baa005..4005505830 100644 --- a/scene/gui/tree.cpp +++ b/scene/gui/tree.cpp @@ -571,21 +571,7 @@ int TreeItem::get_button_by_id(int p_column, int p_id) const { return -1; } -void TreeItem::set_disable_button(int p_column, int p_idx, bool p_disabled) { - ERR_FAIL_INDEX(p_column, cells.size()); - ERR_FAIL_INDEX(p_idx, cells[p_column].buttons.size()); - - cells.write[p_column].buttons.write[p_idx].disabled = p_disabled; - _changed_notify(p_column); -} -bool TreeItem::is_button_disabled(int p_column, int p_idx) const { - - ERR_FAIL_INDEX_V(p_column, cells.size(), false); - ERR_FAIL_INDEX_V(p_idx, cells[p_column].buttons.size(), false); - - return cells[p_column].buttons[p_idx].disabled; -} void TreeItem::set_button(int p_column, int p_idx, const Ref<Texture> &p_button) { ERR_FAIL_COND(p_button.is_null()); @@ -603,6 +589,23 @@ void TreeItem::set_button_color(int p_column, int p_idx, const Color &p_color) { _changed_notify(p_column); } +void TreeItem::set_button_disabled(int p_column, int p_idx, bool p_disabled) { + + ERR_FAIL_INDEX(p_column, cells.size()); + ERR_FAIL_INDEX(p_idx, cells[p_column].buttons.size()); + + cells.write[p_column].buttons.write[p_idx].disabled = p_disabled; + _changed_notify(p_column); +} + +bool TreeItem::is_button_disabled(int p_column, int p_idx) const { + + ERR_FAIL_INDEX_V(p_column, cells.size(), false); + ERR_FAIL_INDEX_V(p_idx, cells[p_column].buttons.size(), false); + + return cells[p_column].buttons[p_idx].disabled; +} + void TreeItem::set_editable(int p_column, bool p_editable) { ERR_FAIL_INDEX(p_column, cells.size()); @@ -792,8 +795,8 @@ void TreeItem::_bind_methods() { ClassDB::bind_method(D_METHOD("get_button", "column", "button_idx"), &TreeItem::get_button); ClassDB::bind_method(D_METHOD("set_button", "column", "button_idx", "button"), &TreeItem::set_button); ClassDB::bind_method(D_METHOD("erase_button", "column", "button_idx"), &TreeItem::erase_button); + ClassDB::bind_method(D_METHOD("set_button_disabled", "column", "button_idx", "disabled"), &TreeItem::set_button_disabled); ClassDB::bind_method(D_METHOD("is_button_disabled", "column", "button_idx"), &TreeItem::is_button_disabled); - ClassDB::bind_method(D_METHOD("set_disable_button", "column", "button_idx", "disabled"), &TreeItem::set_disable_button); ClassDB::bind_method(D_METHOD("set_expand_right", "column", "enable"), &TreeItem::set_expand_right); ClassDB::bind_method(D_METHOD("get_expand_right", "column"), &TreeItem::get_expand_right); diff --git a/scene/gui/tree.h b/scene/gui/tree.h index 6e5e2c1eba..b6cdab766f 100644 --- a/scene/gui/tree.h +++ b/scene/gui/tree.h @@ -209,10 +209,10 @@ public: int get_button_id(int p_column, int p_idx) const; void erase_button(int p_column, int p_idx); int get_button_by_id(int p_column, int p_id) const; - bool is_button_disabled(int p_column, int p_idx) const; void set_button(int p_column, int p_idx, const Ref<Texture> &p_button); void set_button_color(int p_column, int p_idx, const Color &p_color); - void set_disable_button(int p_column, int p_idx, bool p_disabled); + void set_button_disabled(int p_column, int p_idx, bool p_disabled); + bool is_button_disabled(int p_column, int p_idx) const; /* range works for mode number or mode combo */ |