From 6220ad82bcc0b492876dfddb211a0800c4da93f1 Mon Sep 17 00:00:00 2001 From: OverloadedOrama <35376950+OverloadedOrama@users.noreply.github.com> Date: Wed, 18 Dec 2019 00:53:06 +0200 Subject: [PATCH] Frame number labels change color when selected --- Scripts/Canvas.gd | 1 + Scripts/Global.gd | 2 ++ 2 files changed, 3 insertions(+) diff --git a/Scripts/Canvas.gd b/Scripts/Canvas.gd index fec0a3518..e8ad8c8e1 100644 --- a/Scripts/Canvas.gd +++ b/Scripts/Canvas.gd @@ -49,6 +49,7 @@ func _ready() -> void: frame_button.get_node("FrameButton").frame = frame frame_button.get_node("FrameButton").pressed = true frame_button.get_node("FrameID").text = str(frame + 1) + frame_button.get_node("FrameID").add_color_override("font_color", Color("#3c5d75")) Global.frame_container.add_child(frame_button) frame_texture_rect = Global.find_node_by_name(frame_button, "FrameTexture") diff --git a/Scripts/Global.gd b/Scripts/Global.gd index d62aadceb..cfe5ec39e 100644 --- a/Scripts/Global.gd +++ b/Scripts/Global.gd @@ -395,8 +395,10 @@ func frame_changed(value : int) -> void: #Make all frame buttons unpressed for c in canvases: c.frame_button.get_node("FrameButton").pressed = false + c.frame_button.get_node("FrameID").add_color_override("font_color", Color.white) #Make only the current frame button pressed canvas.frame_button.get_node("FrameButton").pressed = true + canvas.frame_button.get_node("FrameID").add_color_override("font_color", Color("#3c5d75")) func create_brush_button(brush_img : Image, brush_type := BRUSH_TYPES.CUSTOM, hint_tooltip := "") -> void: