1
0
Fork 0
mirror of https://github.com/Orama-Interactive/Pixelorama.git synced 2025-01-19 01:29:49 +00:00

Change the background left & right colors of tool buttons in code

This commit is contained in:
Emmanouil Papadeas 2022-07-08 02:54:31 +03:00
parent cb4c54617a
commit a705f848c9
2 changed files with 2 additions and 2 deletions

View file

@ -253,6 +253,8 @@ func _ready() -> void:
func add_tool_button(t: Tool) -> void: func add_tool_button(t: Tool) -> void:
var tool_button: BaseButton = _tool_button_scene.instance() var tool_button: BaseButton = _tool_button_scene.instance()
tool_button.name = t.name 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.get_node("ToolIcon").texture = t.icon
tool_button.hint_tooltip = t.generate_hint_tooltip() tool_button.hint_tooltip = t.generate_hint_tooltip()
t.button_node = tool_button t.button_node = tool_button

View file

@ -19,7 +19,6 @@ __meta__ = {
[node name="BackgroundLeft" type="NinePatchRect" parent="."] [node name="BackgroundLeft" type="NinePatchRect" parent="."]
visible = false visible = false
modulate = Color( 0, 0.52549, 0.811765, 1 )
anchor_bottom = 1.0 anchor_bottom = 1.0
margin_right = 12.0 margin_right = 12.0
texture = ExtResource( 1 ) texture = ExtResource( 1 )
@ -34,7 +33,6 @@ __meta__ = {
[node name="BackgroundRight" type="NinePatchRect" parent="."] [node name="BackgroundRight" type="NinePatchRect" parent="."]
visible = false visible = false
modulate = Color( 0.992157, 0.427451, 0.0784314, 1 )
anchor_bottom = 1.0 anchor_bottom = 1.0
margin_left = 24.0 margin_left = 24.0
margin_top = 24.0 margin_top = 24.0