mirror of
https://github.com/tonytins/CozyPixelStudio.git
synced 2025-06-25 21:24:44 -04:00
Changing a button's texturerect child no longer requires the theme in its file path
Instead, it automatically finds its path, adds the new file name and loads the new texture.
This commit is contained in:
parent
9ce7bae2f9
commit
55e7178e1f
4 changed files with 28 additions and 43 deletions
|
@ -714,6 +714,12 @@ func disable_button(button : BaseButton, disable : bool) -> void:
|
|||
break
|
||||
|
||||
|
||||
func change_button_texturerect(texture_button : TextureRect, new_file_name : String) -> void:
|
||||
var file_name := texture_button.texture.resource_path.get_basename().get_file()
|
||||
var directory_path := texture_button.texture.resource_path.get_basename().replace(file_name, "")
|
||||
texture_button.texture = load(directory_path.plus_file(new_file_name))
|
||||
|
||||
|
||||
func animation_tags_changed(value : Array) -> void:
|
||||
animation_tags = value
|
||||
for child in tag_container.get_children():
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue