From a705f848c91ec59e782d84f136b01dbc090f7b64 Mon Sep 17 00:00:00 2001 From: Emmanouil Papadeas Date: Fri, 8 Jul 2022 02:54:31 +0300 Subject: [PATCH] Change the background left & right colors of tool buttons in code --- src/Autoload/Tools.gd | 2 ++ src/Tools/ToolButton.tscn | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Autoload/Tools.gd b/src/Autoload/Tools.gd index 789e8dda6..6a7d63d37 100644 --- a/src/Autoload/Tools.gd +++ b/src/Autoload/Tools.gd @@ -253,6 +253,8 @@ func _ready() -> void: func add_tool_button(t: Tool) -> void: var tool_button: BaseButton = _tool_button_scene.instance() tool_button.name = t.name + tool_button.get_node("BackgroundLeft").modulate = Global.left_tool_color + tool_button.get_node("BackgroundRight").modulate = Global.right_tool_color tool_button.get_node("ToolIcon").texture = t.icon tool_button.hint_tooltip = t.generate_hint_tooltip() t.button_node = tool_button diff --git a/src/Tools/ToolButton.tscn b/src/Tools/ToolButton.tscn index b448a2065..8aec76f1a 100644 --- a/src/Tools/ToolButton.tscn +++ b/src/Tools/ToolButton.tscn @@ -19,7 +19,6 @@ __meta__ = { [node name="BackgroundLeft" type="NinePatchRect" parent="."] visible = false -modulate = Color( 0, 0.52549, 0.811765, 1 ) anchor_bottom = 1.0 margin_right = 12.0 texture = ExtResource( 1 ) @@ -34,7 +33,6 @@ __meta__ = { [node name="BackgroundRight" type="NinePatchRect" parent="."] visible = false -modulate = Color( 0.992157, 0.427451, 0.0784314, 1 ) anchor_bottom = 1.0 margin_left = 24.0 margin_top = 24.0