Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions scenes/config/settings/GeneralSettings.gd
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,6 @@ func _on_Themes_item_selected(index):
var theme_path : String = theme_id_map[index]
RetroHubConfig.config.current_theme = theme_path

# FIXME: Theme hot-reloading is disabled until nasty GDScript bug is solved
RetroHubUI.show_warning("Theme reloading is temporarily disabled for this version due to an internal bug in RetroHub's engine (Godot).\n \nYou'll have to restart RetroHub manually to switch themes.")

func _on_SetThemePath_pressed():
#warning-ignore:return_value_discarded
OS.shell_open(RetroHubConfig._get_themes_dir())
Expand Down
8 changes: 3 additions & 5 deletions source/Config.gd
Original file line number Diff line number Diff line change
Expand Up @@ -490,7 +490,6 @@ func _load_theme() -> bool:
theme_path = _get_themes_dir().path_join(current_theme)
else:
theme_path = _get_default_themes_dir().path_join(current_theme + ".pck")
# FIXME: Theme hot-reloading is disabled until nasty GDScript bug is solved
if not ProjectSettings.is_pack_loaded(theme_path):
if not ProjectSettings.load_resource_pack(theme_path, false):
push_error("Error when loading theme " + theme_path)
Expand Down Expand Up @@ -535,10 +534,9 @@ func _unload_theme():
save_theme_config()

theme_data = null
# FIXME: Theme hot-reloading is disabled until nasty GDScript bug is solved
#if !ProjectSettings.unload_resource_pack(theme_path):
# push_error("Error when unloading theme " + theme_path)
# return
if not ProjectSettings.unload_resource_pack(theme_path):
push_error("Error when unloading theme " + theme_path)
return

func get_theme_config(key, default_value):
if not _theme_config.has(key):
Expand Down