Skip to content

Commit 76f2420

Browse files
committed
Fix warnings and errors
1 parent f199aff commit 76f2420

16 files changed

+43
-42
lines changed

project.godot

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@ TTS="*res://addons/godot-tts/TTS.gd"
3737

3838
[debug]
3939

40-
gdscript/warnings/native_method_override=1
40+
gdscript/warnings/static_called_on_instance=0
41+
gdscript/warnings/native_method_override=0
4142

4243
[editor_plugins]
4344

scenes/config/ConfigPopup.gd

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ signal popup_hide
1818
%AboutTab
1919
]
2020

21-
var last_tab : Control = null
21+
var last_tab : Button = null
2222
var should_reload_theme := false
2323

2424
func _ready():
@@ -44,6 +44,8 @@ func _input(event: InputEvent):
4444
if not last_tab:
4545
last_tab = n_game_tab
4646
last_tab.grab_focus()
47+
last_tab.set_pressed_no_signal(false)
48+
_handle_buttons()
4749

4850
func open_config():
4951
super.popup_centered_ratio(0.8)

scenes/config/GameSettings.gd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ func _on_discard_pressed():
5353
_on_reset_state()
5454

5555

56-
func _on_editor_tab_changed(tab_container, enter_tab):
56+
func _on_editor_tab_changed(_tab_container, _enter_tab):
5757
self.grab_focus()
5858

5959

scenes/config/NoThemeSettings.tscn

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
anchors_preset = 15
77
anchor_right = 1.0
88
anchor_bottom = 1.0
9+
focus_mode = 2
910
text = "The current theme doesn't have any
1011
custom configuration screen."
1112
horizontal_alignment = 1

scenes/config/settings/GeneralSettings.tscn

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,6 @@ vertical_alignment = 1
281281
[connection signal="pressed" from="ScrollContainer/VBoxContainer/User/SetupWizardButton" to="." method="_on_SetupWizardButton_pressed"]
282282
[connection signal="item_selected" from="ScrollContainer/VBoxContainer/Graphics/HBoxContainer/GraphicsMode" to="." method="_on_GraphicsMode_item_selected"]
283283
[connection signal="toggled" from="ScrollContainer/VBoxContainer/Graphics/HBoxContainer2/VSync" to="." method="_on_VSync_toggled"]
284-
[connection signal="drag_ended" from="ScrollContainer/VBoxContainer/Graphics/HBoxContainer3/RenderRes" to="." method="_on_RenderRes_drag_ended"]
285284
[connection signal="value_changed" from="ScrollContainer/VBoxContainer/Graphics/HBoxContainer3/RenderRes" to="." method="_on_RenderRes_value_changed"]
286285
[connection signal="toggled" from="ScrollContainer/VBoxContainer/Accessibility/HBoxContainer/ScreenReader" to="." method="_on_ScreenReader_toggled"]
287286
[connection signal="confirmed" from="FirstTimeWizardWarning" to="." method="_on_FirstTimeWizardWarning_confirmed"]

scenes/popups/first_time/CompatibilityDetails.gd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ func set_icon(node: TextureRect, level: int):
4949
RetroHubImporter.CompatibilityLevel.SUPPORTED:
5050
node.texture = preload("res://assets/icons/success.svg")
5151

52-
func tts_text(focused: Control) -> String:
52+
func tts_text(_focused: Control) -> String:
5353
var text := ""
5454
# Game Metadata
5555
text += "Game Metadata: "

scenes/popups/first_time/GenericEmulatorInfo.gd

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ var found := false
1010
func _ready():
1111
n_accessibility_focus._on_config_ready(RetroHubConfig.config)
1212

13-
func set_name(name: String):
14-
n_name.text = name
13+
func set_name(_name: String):
14+
n_name.text = _name
1515

1616
func set_logo(texture: Texture2D):
1717
n_logo.texture = texture
@@ -21,6 +21,6 @@ func set_found(_found: bool, details: String):
2121
n_path_section.set_found(found, details)
2222
modulate.a = 1.0 if found else 0.5
2323

24-
func tts_text(focused: Control):
24+
func tts_text(_focused: Control):
2525
return n_name.text + ": " + ("supported" if found else "not supported") + ". " \
2626
+ n_path_section.tts_prompt()

scenes/popups/first_time/ImportSettingsSection.gd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ func set_importer_buttons():
6363
if not_found:
6464
n_import_options.add_item("No systems found")
6565
else:
66-
n_import_options.add_item("Don't import settings", idx + 1)
66+
n_import_options.add_item("Don't import settings", idx)
6767
n_import_options.emit_signal("item_selected", n_import_options.selected)
6868

6969
func _on_ImportOptions_item_selected(_index):

scenes/popups/first_time/RetroArchEmulatorInfo.gd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,6 @@ func set_core_found(_found: bool, details: String):
2222
n_core_section.set_found(found, details)
2323
modulate.a = 1.0 if found else 0.5
2424

25-
func tts_text(focused: Control):
25+
func tts_text(_focused: Control):
2626
return n_name.text + ": " + ("supported" if found else "not supported") + ". " \
2727
+ n_path_section.tts_prompt() + ". " + n_core_section.tts_prompt()

scenes/popups/first_time/SystemTrees.gd

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,9 +102,9 @@ func _on_item_edited(edited: TreeItem):
102102
func is_edit_valid(item: TreeItem):
103103
if item.get_metadata(0):
104104
var system : Dictionary = item.get_metadata(0)
105-
var name : String = system["name"]
106-
if RetroHubConfig.systems.has(name):
107-
return RetroHubConfig.systems[name].num_games == 0
105+
var system_name : String = system["name"]
106+
if RetroHubConfig.systems.has(system_name):
107+
return RetroHubConfig.systems[system_name].num_games == 0
108108
return true
109109

110110
func save():

0 commit comments

Comments
 (0)