Skip to content

Commit f199aff

Browse files
committed
Make private API start with underscore
1 parent 5ce7056 commit f199aff

27 files changed

+208
-209
lines changed

scenes/config/ConfigPopup.gd

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,8 @@ func _on_SettingsTab_focus_entered():
9696

9797
func _on_ConfigPopup_popup_hide():
9898
if should_reload_theme:
99-
RetroHubConfig.load_user_data()
100-
RetroHub.load_theme()
99+
RetroHubConfig._load_user_data()
100+
RetroHub._load_theme()
101101
should_reload_theme = false
102102
RetroHubConfig.save_theme_config()
103103
TTS.speak("Configuration closed.")

scenes/config/GameSettings.gd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ func _on_save_pressed():
4242
n_game_metadata_editor.save_changes()
4343
n_game_info_editor.save_changes()
4444
n_game_emulator_editor.save_changes()
45-
if RetroHubConfig.save_game_data(n_game_metadata_editor.game_data):
45+
if RetroHubConfig._save_game_data(n_game_metadata_editor.game_data):
4646
_on_reset_state()
4747

4848

scenes/config/ScraperSettings.gd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ func _on_ScraperSettings_visibility_changed():
137137
update_scrape_stats(true)
138138
elif n_ss_settings:
139139
n_ss_settings.save_credentials()
140-
RetroHubConfig.save_config()
140+
RetroHubConfig._save_config()
141141

142142
func convert_hash_size_from_range(value: float) -> int:
143143
# Value is actually an int

scenes/config/settings/EmulatorSettings.gd

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ func get_current_emulator_editor():
8484
func save_changes():
8585
var emulator_raw : Dictionary = get_current_emulator_editor().save()
8686
emulator_raw["#modified"] = true
87-
RetroHubConfig.save_emulator(emulator_raw)
87+
RetroHubConfig._save_emulator(emulator_raw)
8888
update_emulator_selection(emulator_raw)
8989
n_save.disabled = true
9090
n_discard.disabled = true
@@ -97,7 +97,7 @@ func discard_changes():
9797

9898

9999
func _on_RestoreEmulator_pressed():
100-
var default_emulator : Dictionary = RetroHubConfig.restore_emulator(get_current_emulator_editor().curr_emulator)
100+
var default_emulator : Dictionary = RetroHubConfig._restore_emulator(get_current_emulator_editor().curr_emulator)
101101
get_current_emulator_editor().curr_emulator = default_emulator
102102
update_emulator_selection(default_emulator)
103103
n_save.disabled = true
@@ -124,7 +124,7 @@ func _on_AddCustomInfoPopup_identifier_picked(id):
124124
}
125125

126126
RetroHubConfig.emulators_map[id] = emulator
127-
RetroHubConfig.save_emulator(emulator)
127+
RetroHubConfig._save_emulator(emulator)
128128

129129
var idx : int = n_emulator_selection.get_item_count()
130130
n_emulator_selection.add_item("[%s] %s" % [emulator["name"], emulator["fullname"]], idx)
@@ -156,7 +156,7 @@ func _on_RetroArchEmulatorEditor_request_add_core():
156156

157157
func _on_RemoveEmulator_pressed():
158158
var emulator_raw : Dictionary = get_current_emulator_editor().curr_emulator
159-
RetroHubConfig.remove_custom_emulator(emulator_raw)
159+
RetroHubConfig._remove_custom_emulator(emulator_raw)
160160

161161
for idx in n_emulator_selection.get_item_count():
162162
if idx == sep_idx:

scenes/config/settings/GeneralSettings.gd

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -41,21 +41,21 @@ func set_themes():
4141
var theme_pck := file.get_line()
4242
if theme_pck.ends_with(".pck"):
4343
n_themes.add_item(theme_pck.get_file().get_basename(), id)
44-
if RetroHubConfig.get_default_themes_dir() in RetroHubConfig.theme_path and \
44+
if RetroHubConfig._get_default_themes_dir() in RetroHubConfig.theme_path and \
4545
theme_pck in RetroHubConfig.theme_path:
4646
n_themes.selected = id
4747
theme_id_map[id] = "res://default_themes/" + theme_pck
4848
id += 1
4949
n_themes.add_separator()
5050
id += 1
5151
# User themes
52-
var dir := DirAccess.open(RetroHubConfig.get_themes_dir())
52+
var dir := DirAccess.open(RetroHubConfig._get_themes_dir())
5353
if dir and not dir.list_dir_begin(): # TODOGODOT4 fill missing arguments https://github.com/godotengine/godot/pull/40547
5454
var next := dir.get_next()
5555
while not next.is_empty():
5656
if not dir.current_is_dir() and next.ends_with(".pck"):
5757
n_themes.add_item(next, id)
58-
if not RetroHubConfig.get_default_themes_dir() in RetroHubConfig.theme_path and \
58+
if not RetroHubConfig._get_default_themes_dir() in RetroHubConfig.theme_path and \
5959
next in RetroHubConfig.theme_path:
6060
n_themes.selected = id
6161
theme_id_map[id] = next
@@ -91,7 +91,7 @@ func _on_Themes_item_selected(index):
9191

9292
func _on_SetThemePath_pressed():
9393
#warning-ignore:return_value_discarded
94-
OS.shell_open(RetroHubConfig.get_themes_dir())
94+
OS.shell_open(RetroHubConfig._get_themes_dir())
9595

9696
func _on_SetGamePath_pressed():
9797
RetroHubUI.filesystem_filters([])
@@ -108,7 +108,7 @@ func _on_Language_item_selected(index):
108108
RetroHubConfig.config.lang = "en"
109109

110110
func _on_AppSettings_hide():
111-
RetroHubConfig.save_config()
111+
RetroHubConfig._save_config()
112112

113113

114114
func _on_AppSettings_visibility_changed():
@@ -128,12 +128,12 @@ func _on_SetupWizardButton_pressed():
128128

129129
func _on_GraphicsMode_item_selected(index):
130130
RetroHubConfig.config.fullscreen = index == 1
131-
RetroHubConfig.save_config()
131+
RetroHubConfig._save_config()
132132

133133

134134
func _on_VSync_toggled(button_pressed):
135135
RetroHubConfig.config.vsync = button_pressed
136-
RetroHubConfig.save_config()
136+
RetroHubConfig._save_config()
137137

138138

139139
func _on_RenderRes_value_changed(value):
@@ -143,4 +143,4 @@ func _on_RenderRes_value_changed(value):
143143

144144
func _on_ScreenReader_toggled(button_pressed):
145145
RetroHubConfig.config.accessibility_screen_reader_enabled = button_pressed
146-
RetroHubConfig.save_config()
146+
RetroHubConfig._save_config()

scenes/config/settings/InputSettings.gd

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ func _on_input_type_changed(input_type: int):
105105
n_input_tab.current_tab = input_type
106106

107107
func _on_hide():
108-
RetroHubConfig.save_config()
108+
RetroHubConfig._save_config()
109109

110110

111111
func _on_StartLayout_pressed():
@@ -117,7 +117,7 @@ func _on_ClearLayout_pressed():
117117
if splits.size() > 1:
118118
Input.remove_joy_mapping(splits[0])
119119
RetroHubConfig.config.custom_input_remap = ""
120-
RetroHubConfig.save_config()
120+
RetroHubConfig._save_config()
121121
n_cn_clear_layout.disabled = true
122122

123123

@@ -143,7 +143,7 @@ func _on_KeyboardRemap_key_remapped(key, old_code, new_code):
143143
keymap[_key].erase(new_code)
144144
keymap[_key].push_back(old_code)
145145
RetroHubConfig.config.mark_for_saving()
146-
RetroHubConfig.save_config()
146+
RetroHubConfig._save_config()
147147

148148
func _on_CN_pressed(input_key):
149149
var button := get_viewport().gui_get_focus_owner()
@@ -167,7 +167,7 @@ func _on_ControllerButtonRemap_remap_done(key, old_button, new_button):
167167
if not old_button in map[_key]:
168168
map[_key].push_back(old_button)
169169
RetroHubConfig.config.mark_for_saving()
170-
RetroHubConfig.save_config()
170+
RetroHubConfig._save_config()
171171

172172
func _on_CNAxis_pressed(axis):
173173
var button := get_viewport().gui_get_focus_owner()
@@ -179,7 +179,7 @@ func _on_ControllerAxisRemap_remap_done(action, old_axis, new_axis):
179179
var is_main : bool = action == "rh_left"
180180
RetroHubConfig.config.input_controller_main_axis = new_axis if is_main else old_axis
181181
RetroHubConfig.config.input_controller_secondary_axis = old_axis if is_main else new_axis
182-
RetroHubConfig.save_config()
182+
RetroHubConfig._save_config()
183183

184184

185185
func _on_CNIconType_item_selected(index):
@@ -224,14 +224,14 @@ func _on_CNDelay_value_changed(value):
224224

225225
func _on_KBReset_pressed():
226226
RetroHubConfig.config.input_key_map = ConfigData.default_input_key_map()
227-
RetroHubConfig.save_config()
227+
RetroHubConfig._save_config()
228228

229229

230230
func _on_CNReset_pressed():
231231
RetroHubConfig.config.input_controller_map = ConfigData.default_input_controller_map()
232232
RetroHubConfig.config.input_controller_main_axis = "left"
233233
RetroHubConfig.config.input_controller_secondary_axis = "right"
234-
RetroHubConfig.save_config()
234+
RetroHubConfig._save_config()
235235

236236

237237
func _on_VirtualKeyboardLayout_item_selected(index):

scenes/config/settings/RegionSettings.gd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ func _on_DateFormat_item_selected(index):
120120
RetroHubConfig.config.date_format = "yyyy/mm/dd"
121121

122122
func _on_AppSettings_hide():
123-
RetroHubConfig.save_config()
123+
RetroHubConfig._save_config()
124124

125125

126126
func _on_ResetRegion_pressed():

scenes/config/settings/SystemSettings.gd

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ func _on_SystemEditor_change_ocurred():
7373
func save_changes():
7474
var system_raw : Dictionary = n_system_editor.save()
7575
system_raw["#modified"] = true
76-
RetroHubConfig.save_system(system_raw)
76+
RetroHubConfig._save_system(system_raw)
7777
update_system_selection(system_raw)
7878
emit_signal("theme_reload")
7979
n_save.disabled = true
@@ -95,7 +95,7 @@ func _on_SystemEditor_request_extensions(system_name, curr_extensions):
9595

9696

9797
func _on_RestoreSystem_pressed():
98-
var default_system : Dictionary = RetroHubConfig.restore_system(n_system_editor.curr_system)
98+
var default_system : Dictionary = RetroHubConfig._restore_system(n_system_editor.curr_system)
9999
n_system_editor.curr_system = default_system
100100
update_system_selection(default_system)
101101
emit_signal("theme_reload")
@@ -125,7 +125,7 @@ func _on_AddCustomInfoPopup_identifier_picked(id):
125125
}
126126

127127
RetroHubConfig._systems_raw[id] = system
128-
RetroHubConfig.save_system(system)
128+
RetroHubConfig._save_system(system)
129129

130130
var idx : int = n_system_selection.get_item_count()
131131
n_system_selection.add_item("[%s] %s" % [system["name"], system["fullname"]], idx)
@@ -140,7 +140,7 @@ func _on_AddSystem_pressed():
140140

141141
func _on_RemoveSystem_pressed():
142142
var system_raw : Dictionary = n_system_editor.curr_system
143-
RetroHubConfig.remove_custom_system(system_raw)
143+
RetroHubConfig._remove_custom_system(system_raw)
144144

145145
for idx in n_system_selection.get_item_count():
146146
if idx == sep_idx:

scenes/config/settings/emulator/EmulatorEditor.gd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ func save() -> Dictionary:
3434
curr_emulator["binpath"] = n_path.text
3535
curr_emulator["command"] = n_command.text
3636

37-
RetroHubConfig.set_emulator_path(curr_emulator["name"], "binpath", n_path.text)
37+
RetroHubConfig._set_emulator_path(curr_emulator["name"], "binpath", n_path.text)
3838

3939
return curr_emulator
4040

scenes/config/settings/emulator/RetroArchEmulatorEditor.gd

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,8 @@ func save() -> Dictionary:
6969

7070
curr_emulator["cores"] = cores.duplicate(true)
7171

72-
RetroHubConfig.set_emulator_path("retroarch", "binpath", n_path.text)
73-
RetroHubConfig.set_emulator_path("retroarch", "corepath", n_core_path.text)
72+
RetroHubConfig._set_emulator_path("retroarch", "binpath", n_path.text)
73+
RetroHubConfig._set_emulator_path("retroarch", "corepath", n_core_path.text)
7474

7575
return curr_emulator
7676

0 commit comments

Comments
 (0)