mirror of
https://github.com/tonytins/CozyPixelStudio.git
synced 2025-06-25 15: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
|
@ -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