mirror of
https://github.com/tonytins/CozyPixelStudio.git
synced 2025-06-26 13:44:44 -04:00
Changed Palette and Layer TextureButtons into Buttons, massive asset renaming
Most asset filenames are now in snake_case
This commit is contained in:
parent
148d918f12
commit
9482b47825
653 changed files with 2178 additions and 3931 deletions
|
@ -1,9 +1,7 @@
|
|||
[gd_scene load_steps=3 format=2]
|
||||
|
||||
[ext_resource path="res://src/UI/Dialogs/FrameTagDialog.gd" type="Script" id=1]
|
||||
[ext_resource path="res://Assets/Graphics/Dark Themes/Timeline/new_frame.png" type="Texture" id=2]
|
||||
|
||||
|
||||
[ext_resource path="res://Assets/Graphics/dark_themes/timeline/new_frame.png" type="Texture" id=2]
|
||||
|
||||
[node name="FrameTagDialog" type="AcceptDialog"]
|
||||
margin_right = 83.0
|
||||
|
|
|
@ -360,25 +360,32 @@ func change_theme(ID : int) -> void:
|
|||
var last_backslash = button.texture_normal.resource_path.get_base_dir().find_last("/")
|
||||
var button_category = button.texture_normal.resource_path.get_base_dir().right(last_backslash + 1)
|
||||
var normal_file_name = button.texture_normal.resource_path.get_file()
|
||||
button.texture_normal = load("res://Assets/Graphics/%s Themes/%s/%s" % [Global.theme_type, button_category, normal_file_name])
|
||||
button.texture_normal = load("res://Assets/Graphics/%s_themes/%s/%s" % [Global.theme_type.to_lower(), button_category, normal_file_name])
|
||||
if button.texture_pressed:
|
||||
var pressed_file_name = button.texture_pressed.resource_path.get_file()
|
||||
button.texture_pressed = load("res://Assets/Graphics/%s Themes/%s/%s" % [Global.theme_type, button_category, pressed_file_name])
|
||||
button.texture_pressed = load("res://Assets/Graphics/%s_themes/%s/%s" % [Global.theme_type.to_lower(), button_category, pressed_file_name])
|
||||
if button.texture_hover:
|
||||
var hover_file_name = button.texture_hover.resource_path.get_file()
|
||||
button.texture_hover = load("res://Assets/Graphics/%s Themes/%s/%s" % [Global.theme_type, button_category, hover_file_name])
|
||||
button.texture_hover = load("res://Assets/Graphics/%s_themes/%s/%s" % [Global.theme_type.to_lower(), button_category, hover_file_name])
|
||||
if button.texture_disabled:
|
||||
var disabled_file_name = button.texture_disabled.resource_path.get_file()
|
||||
button.texture_disabled = load("res://Assets/Graphics/%s Themes/%s/%s" % [Global.theme_type, button_category, disabled_file_name])
|
||||
button.texture_disabled = load("res://Assets/Graphics/%s_themes/%s/%s" % [Global.theme_type.to_lower(), button_category, disabled_file_name])
|
||||
elif button is Button:
|
||||
var theme_type := Global.theme_type
|
||||
if theme_type == "Gold":
|
||||
theme_type = "Light"
|
||||
var texture : TextureRect = button.get_child(0)
|
||||
var last_backslash = texture.texture.resource_path.get_base_dir().find_last("/")
|
||||
var button_category = texture.texture.resource_path.get_base_dir().right(last_backslash + 1)
|
||||
var normal_file_name = texture.texture.resource_path.get_file()
|
||||
texture.texture = load("res://Assets/Graphics/%s Themes/%s/%s" % [theme_type, button_category, normal_file_name])
|
||||
|
||||
var texture : TextureRect
|
||||
for child in button.get_children():
|
||||
if child is TextureRect:
|
||||
texture = child
|
||||
break
|
||||
|
||||
if texture:
|
||||
var last_backslash = texture.texture.resource_path.get_base_dir().find_last("/")
|
||||
var button_category = texture.texture.resource_path.get_base_dir().right(last_backslash + 1)
|
||||
var normal_file_name = texture.texture.resource_path.get_file()
|
||||
texture.texture = load("res://Assets/Graphics/%s_themes/%s/%s" % [theme_type.to_lower(), button_category, normal_file_name])
|
||||
|
||||
# Make sure the frame text gets updated
|
||||
Global.current_frame = Global.current_frame
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue