mirror of
https://github.com/tonytins/CozyPixelStudio.git
synced 2025-06-25 15:34:43 -04:00
Added a dark texture for the restore to default button
For light & caramel themes
This commit is contained in:
parent
051f3df147
commit
db606a5051
7 changed files with 80 additions and 2 deletions
|
@ -96,7 +96,7 @@ func change_theme(ID : int) -> void:
|
|||
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" % [theme_type_string, button_category, hover_file_name])
|
||||
if button.texture_disabled:
|
||||
if button.texture_disabled and button.texture_disabled == StreamTexture:
|
||||
var disabled_file_name = button.texture_disabled.resource_path.get_file()
|
||||
button.texture_disabled = load("res://assets/graphics/%s_themes/%s/%s" % [theme_type_string, button_category, disabled_file_name])
|
||||
elif button is Button:
|
||||
|
|
|
@ -7,6 +7,14 @@ var default_value
|
|||
var node : Node
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
# Handle themes
|
||||
if Global.theme_type == Global.Theme_Types.LIGHT:
|
||||
texture_normal = load("res://assets/graphics/light_themes/misc/icon_reload.png")
|
||||
elif Global.theme_type == Global.Theme_Types.CARAMEL:
|
||||
texture_normal = load("res://assets/graphics/caramel_themes/misc/icon_reload.png")
|
||||
|
||||
|
||||
func _on_RestoreDefaultButton_pressed() -> void:
|
||||
Global.set(setting_name, default_value)
|
||||
Global.config_cache.set_value("preferences", setting_name, default_value)
|
||||
|
|
|
@ -5,7 +5,9 @@
|
|||
|
||||
[sub_resource type="ImageTexture" id=1]
|
||||
|
||||
[node name="RestoreDefaultButton" type="TextureButton"]
|
||||
[node name="RestoreDefaultButton" type="TextureButton" groups=[
|
||||
"UIButtons",
|
||||
]]
|
||||
margin_right = 16.0
|
||||
margin_bottom = 16.0
|
||||
disabled = true
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue