Skip to content

Commit 05f9b2d

Browse files
committed
Fix popup issues regarding embedded popups and closing
1 parent 5b14dca commit 05f9b2d

11 files changed

+19
-62
lines changed

scenes/config/AboutSettings.tscn

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ size_flags_vertical = 3
5454
theme = ExtResource("15")
5555

5656
[node name="About" type="ScrollContainer" parent="TabContainerHandler/TabContainer"]
57-
visible = false
5857
layout_mode = 2
5958
size_flags_horizontal = 3
6059
size_flags_vertical = 3
@@ -160,6 +159,7 @@ layout_mode = 2
160159
script = ExtResource("9")
161160

162161
[node name="Libraries" type="ScrollContainer" parent="TabContainerHandler/TabContainer"]
162+
visible = false
163163
layout_mode = 2
164164

165165
[node name="VBoxContainer" type="VBoxContainer" parent="TabContainerHandler/TabContainer/Libraries"]

scenes/config/settings/AddCustomInfo.gd

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -86,10 +86,3 @@ func tts_text(focused: Control):
8686
text += node.get_child(1).text + ". "
8787
return text
8888
return ""
89-
90-
func _on_close_requested():
91-
hide()
92-
93-
94-
func _on_focus_exited():
95-
hide()

scenes/config/settings/AddCustomInfo.tscn

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@
44
[ext_resource type="Texture2D" uid="uid://dfth5p8xpsgmy" path="res://assets/icons/success.svg" id="2"]
55
[ext_resource type="Script" path="res://scenes/ui_nodes/AccessibilityFocus.gd" id="3"]
66

7-
[node name="AddCustomInfoPopup" type="Window"]
7+
[node name="AddCustomInfoPopup" type="Popup"]
88
initial_position = 1
99
size = Vector2i(624, 357)
10-
transient = true
11-
popup_window = true
10+
visible = true
11+
borderless = false
1212
script = ExtResource("1")
1313

1414
[node name="Panel" type="Panel" parent="."]
@@ -102,8 +102,6 @@ size_flags_horizontal = 4
102102
size_flags_vertical = 10
103103
text = "Ok"
104104

105-
[connection signal="close_requested" from="." to="." method="_on_close_requested"]
106-
[connection signal="focus_exited" from="." to="." method="_on_focus_exited"]
107105
[connection signal="text_changed" from="Panel/VBoxContainer/LineEdit" to="." method="check_text"]
108106
[connection signal="text_submitted" from="Panel/VBoxContainer/LineEdit" to="." method="_on_LineEdit_text_entered"]
109107
[connection signal="pressed" from="Panel/VBoxContainer/OK" to="." method="_on_OK_pressed"]

scenes/config/settings/AddExistingInfo.gd

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -48,13 +48,5 @@ func _on_OK_pressed():
4848
emit_signal("identifier_picked", n_options.get_selected_metadata())
4949
hide()
5050

51-
52-
func _on_AddExistingInfoPopup_popup_hide():
51+
func _on_popup_hide():
5352
n_options.clear()
54-
55-
func _on_close_requested():
56-
hide()
57-
58-
59-
func _on_focus_exited():
60-
hide()

scenes/config/settings/AddExistingInfo.tscn

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,11 @@
33
[ext_resource type="Script" path="res://scenes/config/settings/AddExistingInfo.gd" id="1"]
44
[ext_resource type="Script" path="res://scenes/ui_nodes/AccessibilityFocus.gd" id="2"]
55

6-
[node name="AddExistingInfoPopup" type="Window"]
6+
[node name="AddExistingInfoPopup" type="Popup"]
7+
position = Vector2i(0, 36)
78
size = Vector2i(528, 343)
8-
transient = true
9-
popup_window = true
9+
visible = true
10+
borderless = false
1011
script = ExtResource("1")
1112

1213
[node name="Panel" type="Panel" parent="."]
@@ -49,6 +50,5 @@ size_flags_horizontal = 4
4950
size_flags_vertical = 8
5051
text = "Ok"
5152

52-
[connection signal="close_requested" from="." to="." method="_on_close_requested"]
53-
[connection signal="focus_exited" from="." to="." method="_on_focus_exited"]
53+
[connection signal="popup_hide" from="." to="." method="_on_popup_hide"]
5454
[connection signal="pressed" from="Panel/VBoxContainer/OK" to="." method="_on_OK_pressed"]

scenes/config/settings/input/KeyboardRemap.gd

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,3 @@ func _on_Timer_timeout():
4747
await get_tree().process_frame
4848
TTS.speak("Key was remapped to " + n_key_label.text)
4949
emit_signal("key_remapped", key, oldcode, keycode)
50-
51-
52-
func _on_close_requested():
53-
hide()
54-
55-
56-
func _on_focus_exited():
57-
hide()

scenes/config/settings/input/KeyboardRemap.tscn

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
[ext_resource type="FontFile" path="res://resources/fonts/default_italic.tres" id="1"]
44
[ext_resource type="Script" path="res://scenes/config/settings/input/KeyboardRemap.gd" id="2"]
55

6-
[node name="KeyboardRemap" type="Window"]
6+
[node name="KeyboardRemap" type="Popup"]
77
initial_position = 1
88
size = Vector2i(283, 179)
9-
transient = true
10-
popup_window = true
9+
visible = true
10+
borderless = false
1111
script = ExtResource("2")
1212

1313
[node name="Panel" type="Panel" parent="."]
@@ -55,6 +55,4 @@ unique_name_in_owner = true
5555
wait_time = 1.2
5656
one_shot = true
5757

58-
[connection signal="close_requested" from="." to="." method="_on_close_requested"]
59-
[connection signal="focus_exited" from="." to="." method="_on_focus_exited"]
6058
[connection signal="timeout" from="Panel/Timer" to="." method="_on_Timer_timeout"]

scenes/config/settings/system/RetroArchConfig.gd

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -93,9 +93,3 @@ func tts_tree_item_text(item: TreeItem, tree: Tree) -> String:
9393
return "Remove emulator"
9494
return ""
9595

96-
func _on_close_requested():
97-
hide()
98-
99-
100-
func _on_focus_exited():
101-
hide()

scenes/config/settings/system/RetroArchConfig.tscn

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
[ext_resource type="Script" path="res://scenes/config/settings/system/RetroArchConfig.gd" id="1"]
44
[ext_resource type="Script" path="res://scenes/ui_nodes/AccessibilityFocus.gd" id="2"]
55

6-
[node name="RetroArchConfig" type="Window"]
6+
[node name="RetroArchConfig" type="Popup"]
77
size = Vector2i(584, 422)
8-
transient = true
9-
popup_window = true
8+
visible = true
9+
borderless = false
1010
script = ExtResource("1")
1111

1212
[node name="Panel" type="Panel" parent="."]
@@ -79,8 +79,6 @@ size_flags_vertical = 8
7979
focus_neighbor_bottom = NodePath("../HBoxContainer/CoreOptions")
8080
text = "Ok"
8181

82-
[connection signal="close_requested" from="." to="." method="_on_close_requested"]
83-
[connection signal="focus_exited" from="." to="." method="_on_focus_exited"]
8482
[connection signal="pressed" from="Panel/VBoxContainer/HBoxContainer/AddCore" to="." method="_on_AddCore_pressed"]
8583
[connection signal="item_activated" from="Panel/VBoxContainer/Cores" to="." method="_on_Cores_item_activated"]
8684
[connection signal="pressed" from="Panel/VBoxContainer/OK" to="." method="_on_OK_pressed"]

scenes/config/settings/system/SelectExtensionsPopup.gd

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -115,11 +115,3 @@ func _on_OK_pressed():
115115
hide()
116116
emit_signal("extensions_picked", extensions.duplicate())
117117
extensions.clear()
118-
119-
120-
func _on_close_requested():
121-
hide()
122-
123-
124-
func _on_focus_exited():
125-
hide()

0 commit comments

Comments
 (0)