diff --git a/assets/graphics/caramel_themes/misc/icon_reload.png b/assets/graphics/caramel_themes/misc/icon_reload.png new file mode 100644 index 000000000..cd4586244 Binary files /dev/null and b/assets/graphics/caramel_themes/misc/icon_reload.png differ diff --git a/assets/graphics/caramel_themes/misc/icon_reload.png.import b/assets/graphics/caramel_themes/misc/icon_reload.png.import new file mode 100644 index 000000000..50ca2c1e5 --- /dev/null +++ b/assets/graphics/caramel_themes/misc/icon_reload.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/icon_reload.png-e8a158cd156ea5e131991fdbb47cfd96.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/graphics/caramel_themes/misc/icon_reload.png" +dest_files=[ "res://.import/icon_reload.png-e8a158cd156ea5e131991fdbb47cfd96.stex" ] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=false +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +stream=false +size_limit=0 +detect_3d=true +svg/scale=1.0 diff --git a/assets/graphics/light_themes/misc/icon_reload.png b/assets/graphics/light_themes/misc/icon_reload.png new file mode 100644 index 000000000..cd4586244 Binary files /dev/null and b/assets/graphics/light_themes/misc/icon_reload.png differ diff --git a/assets/graphics/light_themes/misc/icon_reload.png.import b/assets/graphics/light_themes/misc/icon_reload.png.import new file mode 100644 index 000000000..25f5b73ec --- /dev/null +++ b/assets/graphics/light_themes/misc/icon_reload.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/icon_reload.png-c15ad678b067a1d009ad31f253da051f.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/graphics/light_themes/misc/icon_reload.png" +dest_files=[ "res://.import/icon_reload.png-c15ad678b067a1d009ad31f253da051f.stex" ] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=false +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +stream=false +size_limit=0 +detect_3d=true +svg/scale=1.0 diff --git a/src/Preferences/HandleThemes.gd b/src/Preferences/HandleThemes.gd index acf62cc71..94bbfc691 100644 --- a/src/Preferences/HandleThemes.gd +++ b/src/Preferences/HandleThemes.gd @@ -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: diff --git a/src/Preferences/RestoreDefaultButton.gd b/src/Preferences/RestoreDefaultButton.gd index f9d9e727d..b3983cc15 100644 --- a/src/Preferences/RestoreDefaultButton.gd +++ b/src/Preferences/RestoreDefaultButton.gd @@ -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) diff --git a/src/Preferences/RestoreDefaultButton.tscn b/src/Preferences/RestoreDefaultButton.tscn index a9cbedad2..1c7c2cd6a 100644 --- a/src/Preferences/RestoreDefaultButton.tscn +++ b/src/Preferences/RestoreDefaultButton.tscn @@ -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