File tree Expand file tree Collapse file tree 3 files changed +13
-6
lines changed Expand file tree Collapse file tree 3 files changed +13
-6
lines changed Original file line number Diff line number Diff line change @@ -86,6 +86,9 @@ func _on_Themes_item_selected(index):
86
86
var theme_path : String = theme_id_map [index ]
87
87
RetroHubConfig .config .current_theme = theme_path
88
88
89
+ # FIXME: Theme hot-reloading is disabled until nasty GDScript bug is solved
90
+ RetroHubUI .show_warning ("Theme reloading is temporarily disabled for this version due to an internal bug in RetroHub's engine (Godot).\n \n You'll have to restart RetroHub manually to switch themes." )
91
+
89
92
func _on_SetThemePath_pressed ():
90
93
# warning-ignore:return_value_discarded
91
94
OS .shell_open (RetroHubConfig .get_themes_dir ())
Original file line number Diff line number Diff line change @@ -87,6 +87,7 @@ script = ExtResource("6")
87
87
unique_name_in_owner = true
88
88
handle_input_locally = false
89
89
size = Vector2i (608 , 346 )
90
+ popup_window = true
90
91
content_scale_size = Vector2i (608 , 346 )
91
92
content_scale_mode = 1
92
93
content_scale_aspect = 4
Original file line number Diff line number Diff line change @@ -427,9 +427,11 @@ func load_theme() -> bool:
427
427
theme_path = get_themes_dir () + "/" + current_theme
428
428
else :
429
429
theme_path = get_default_themes_dir () + "/" + current_theme + ".pck"
430
- if ! ProjectSettings .load_resource_pack (theme_path , false ):
431
- push_error ("Error when loading theme " + theme_path )
432
- return false
430
+ # FIXME: Theme hot-reloading is disabled until nasty GDScript bug is solved
431
+ if not ProjectSettings .is_pack_loaded (theme_path ):
432
+ if not ProjectSettings .load_resource_pack (theme_path , false ):
433
+ push_error ("Error when loading theme " + theme_path )
434
+ return false
433
435
434
436
load_theme_data ()
435
437
if theme_data .entry_scene :
@@ -470,9 +472,10 @@ func unload_theme():
470
472
save_theme_config ()
471
473
472
474
theme_data = null
473
- if ! ProjectSettings .unload_resource_pack (theme_path ):
474
- push_error ("Error when unloading theme " + theme_path )
475
- return
475
+ # FIXME: Theme hot-reloading is disabled until nasty GDScript bug is solved
476
+ # if !ProjectSettings.unload_resource_pack(theme_path):
477
+ # push_error("Error when unloading theme " + theme_path)
478
+ # return
476
479
477
480
func get_theme_config (key , default_value ):
478
481
if not _theme_config .has (key ):
You can’t perform that action at this time.
0 commit comments