diff --git a/Prefabs/FrameButton.tscn b/Prefabs/FrameButton.tscn index 68225065c..33443f4f1 100644 --- a/Prefabs/FrameButton.tscn +++ b/Prefabs/FrameButton.tscn @@ -33,5 +33,12 @@ margin_right = 20.0 margin_bottom = 20.0 mouse_default_cursor_shape = 2 items = [ "Remove Frame", null, 0, false, true, -1, 0, null, "", false, "Clone Frame", null, 0, false, false, -1, 0, null, "", false, "Move Left", null, 0, false, true, -1, 0, null, "", false, "Move Right", null, 0, false, true, -1, 0, null, "", false ] + +[node name="LinkedIndicator" type="Polygon2D" parent="."] +visible = false +color = Color( 0.0627451, 0.741176, 0.215686, 1 ) +invert_enable = true +invert_border = 1.0 +polygon = PoolVector2Array( 0, 0, 36, 0, 36, 36, 0, 36 ) [connection signal="pressed" from="." to="." method="_on_FrameButton_pressed"] [connection signal="id_pressed" from="PopupMenu" to="." method="_on_PopupMenu_id_pressed"] diff --git a/Scripts/FrameButton.gd b/Scripts/FrameButton.gd index 98ec51615..7c457479c 100644 --- a/Scripts/FrameButton.gd +++ b/Scripts/FrameButton.gd @@ -7,6 +7,8 @@ onready var popup_menu := $PopupMenu func _ready() -> void: hint_tooltip = "Frame: %s, Layer: %s" % [frame, layer] + if frame in Global.layers[layer][5]: + get_node("LinkedIndicator").visible = true func _on_FrameButton_pressed() -> void: if Input.is_action_just_released("left_mouse"): diff --git a/Scripts/LayerContainer.gd b/Scripts/LayerContainer.gd index d7e9a59d1..4f6149289 100644 --- a/Scripts/LayerContainer.gd +++ b/Scripts/LayerContainer.gd @@ -66,3 +66,5 @@ func _on_LockButton_pressed() -> void: func _on_LinkButton_pressed() -> void: Global.layers[i][4] = !Global.layers[i][4] + if !Global.layers[i][5]: + Global.layers[i][5].append(Global.current_frame)