1
0
Fork 0
mirror of https://github.com/Orama-Interactive/Pixelorama.git synced 2025-01-18 09:09:47 +00:00

Fix some buttons not being affected by the custom icon color on startup

This commit is contained in:
Emmanouil Papadeas 2024-08-13 04:23:56 +03:00
parent 8163015c02
commit 1a99d524d1
3 changed files with 3 additions and 1 deletions

View file

@ -376,6 +376,7 @@ func add_tool_button(t: Tool, insert_pos := -1) -> void:
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").modulate = Global.modulate_icon_color
tool_button.tooltip_text = t.generate_hint_tooltip()
t.button_node = tool_button
_tool_buttons.add_child(tool_button)

View file

@ -10,6 +10,7 @@ var node: Node
func _ready() -> void:
disabled = true
add_to_group(&"UIButtons")
modulate = Global.modulate_icon_color
texture_normal = preload("res://assets/graphics/misc/icon_reload.png")
texture_disabled = ImageTexture.new()

View file

@ -42,7 +42,7 @@ func _ready() -> void:
custom_minimum_size.y = Global.animation_timeline.cel_size
label.text = layer.name
line_edit.text = layer.name
for child in get_children():
for child in $HBoxContainer.get_children():
if not child is Button:
continue
var texture := child.get_child(0)