mirror of
https://github.com/tonytins/CozyPixelStudio.git
synced 2025-06-25 11:54:44 -04:00
Small UI improvement - The visibility icon will remain in a fixed place no matter how long the layer name is.
This commit is contained in:
parent
3b68698be3
commit
b9b0d3e1b3
3 changed files with 45 additions and 24 deletions
|
@ -516,9 +516,9 @@ func layers_changed(value : Array) -> void:
|
|||
if !layers[i][0]:
|
||||
layers[i][0] = tr("Layer") + " %s" % i
|
||||
|
||||
layer_container.get_child(0).get_child(1).text = layers[i][0]
|
||||
layer_container.get_child(0).get_child(2).text = layers[i][0]
|
||||
layers_container.add_child(layer_container)
|
||||
layer_container.label.text = layers[i][0]
|
||||
layer_container.line_edit.text = layers[i][0]
|
||||
|
||||
frames_container.add_child(layers[i][2])
|
||||
for j in range(canvases.size()):
|
||||
|
|
|
@ -4,12 +4,15 @@ extends Button
|
|||
var i := 0
|
||||
# warning-ignore:unused_class_variable
|
||||
var currently_selected := false
|
||||
|
||||
onready var visibility_button := $HBoxContainer/VisibilityButton
|
||||
onready var label := $HBoxContainer/Label
|
||||
onready var line_edit := $HBoxContainer/LineEdit
|
||||
var visibility_button : BaseButton
|
||||
var label : Label
|
||||
var line_edit : LineEdit
|
||||
|
||||
func _ready() -> void:
|
||||
visibility_button = Global.find_node_by_name(self, "VisibilityButton")
|
||||
label = Global.find_node_by_name(self, "Label")
|
||||
line_edit = Global.find_node_by_name(self, "LineEdit")
|
||||
|
||||
if Global.layers[i][1]:
|
||||
visibility_button.texture_normal = load("res://Assets/Graphics/%s Themes/Layers/Layer_Visible.png" % Global.theme_type)
|
||||
visibility_button.texture_hover = load("res://Assets/Graphics/%s Themes/Layers/Layer_Visible_Hover.png" % Global.theme_type)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue