Skip to content

Commit 728c24b

Browse files
committed
Tweaks due to engine update to v4.2.1-stable
1 parent 7c2b075 commit 728c24b

File tree

8 files changed

+37
-39
lines changed

8 files changed

+37
-39
lines changed

.github/workflows/linux_build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ jobs:
111111
uses: ./godot/.github/actions/godot-build
112112
with:
113113
root: ./godot
114-
sconsflags: verbose=yes warnings=all werror=yes use_lto=yes optimize=size arch=${{ matrix.arch }}
114+
sconsflags: verbose=yes warnings=all werror=no use_lto=yes optimize=size arch=${{ matrix.arch }}
115115
platform: linuxbsd
116116
target: template_release
117117
tools: false

.github/workflows/mac_build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ jobs:
145145
uses: ./godot/.github/actions/godot-build
146146
with:
147147
root: ./godot
148-
sconsflags: verbose=yes warnings=all werror=yes use_lto=yes optimize=size arch=x86_64
148+
sconsflags: verbose=yes warnings=all werror=no use_lto=yes optimize=size arch=x86_64
149149
platform: macos
150150
target: template_release
151151
tools: false
@@ -155,7 +155,7 @@ jobs:
155155
uses: ./godot/.github/actions/godot-build
156156
with:
157157
root: ./godot
158-
sconsflags: verbose=yes warnings=all werror=yes use_lto=yes optimize=size arch=arm64
158+
sconsflags: verbose=yes warnings=all werror=no use_lto=yes optimize=size arch=arm64
159159
platform: macos
160160
target: template_release
161161
tools: false

.github/workflows/windows_build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ jobs:
115115
uses: ./godot/.github/actions/godot-build
116116
with:
117117
root: ./godot
118-
sconsflags: verbose=yes warnings=all werror=yes use_lto=yes optimize=size arch=${{ matrix.arch }}
118+
sconsflags: verbose=yes warnings=all werror=no use_lto=yes optimize=size arch=${{ matrix.arch }}
119119
platform: windows
120120
target: template_release
121121
tools: false

resources/default_theme.tres

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -202,16 +202,6 @@ corner_radius_top_right = 3
202202
corner_radius_bottom_right = 3
203203
corner_radius_bottom_left = 3
204204

205-
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_cejk0"]
206-
content_margin_left = 10.0
207-
content_margin_top = 4.0
208-
content_margin_right = 10.0
209-
content_margin_bottom = 4.0
210-
bg_color = Color(0.207843, 0.258824, 0.392157, 1)
211-
border_width_top = 2
212-
border_color = Color(1, 0.733333, 0.537255, 1)
213-
corner_detail = 1
214-
215205
[sub_resource type="StyleBoxEmpty" id="1594"]
216206
content_margin_left = 4.0
217207
content_margin_top = 4.0
@@ -502,6 +492,16 @@ border_width_right = 1
502492
border_color = Color(0.175, 0.175, 0.175, 1)
503493
corner_detail = 1
504494

495+
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_cejk0"]
496+
content_margin_left = 10.0
497+
content_margin_top = 4.0
498+
content_margin_right = 10.0
499+
content_margin_bottom = 4.0
500+
bg_color = Color(0.207843, 0.258824, 0.392157, 1)
501+
border_width_top = 2
502+
border_color = Color(1, 0.733333, 0.537255, 1)
503+
corner_detail = 1
504+
505505
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_a00um"]
506506
content_margin_left = 10.0
507507
content_margin_top = 6.0
@@ -701,7 +701,6 @@ HSlider/styles/grabber_area = SubResource("StyleBoxFlat_3eyyw")
701701
HSlider/styles/grabber_area_highlight = SubResource("StyleBoxFlat_rpnq8")
702702
HSlider/styles/slider = SubResource("StyleBoxFlat_go4h4")
703703
HyperFocused/styles/focus = SubResource("4878")
704-
HyperFocused/styles/tab_selected = SubResource("StyleBoxFlat_cejk0")
705704
Label/constants/line_spacing = 3
706705
Label/styles/normal = SubResource("1594")
707706
LineEdit/colors/clear_button_color_pressed = Color(1, 0.733333, 0.537255, 1)
@@ -711,19 +710,23 @@ LineEdit/styles/focus = SubResource("4827")
711710
LineEdit/styles/normal = SubResource("4")
712711
LineEdit/styles/read_only = SubResource("4783")
713712
LinkButton/colors/font_pressed_color = Color(1, 0.733333, 0.537255, 1)
713+
MenuSideBottomButton/base_type = &"Button"
714714
MenuSideBottomButton/colors/font_color_pressed = Color(1, 1, 1, 1)
715715
MenuSideBottomButton/colors/icon_color_pressed = Color(1, 0.733333, 0.537255, 1)
716716
MenuSideBottomButton/styles/focus = SubResource("4649")
717717
MenuSideBottomButton/styles/hover = SubResource("4649")
718718
MenuSideBottomButton/styles/normal = SubResource("4739")
719719
MenuSideBottomButton/styles/pressed = SubResource("4648")
720+
MenuSideButton/base_type = &"Button"
720721
MenuSideButton/colors/font_color_pressed = Color(1, 1, 1, 1)
721722
MenuSideButton/colors/icon_color_pressed = Color(1, 0.733333, 0.537255, 1)
722723
MenuSideButton/styles/focus = SubResource("4516")
723724
MenuSideButton/styles/hover = SubResource("4339")
724725
MenuSideButton/styles/normal = SubResource("4383")
725726
MenuSideButton/styles/pressed = SubResource("4295")
727+
MenuSidePanel/base_type = &"Panel"
726728
MenuSidePanel/styles/panel = SubResource("4427")
729+
MenuSideTopButton/base_type = &"Button"
727730
MenuSideTopButton/colors/font_color_pressed = Color(1, 1, 1, 1)
728731
MenuSideTopButton/colors/icon_color_pressed = Color(1, 0.733333, 0.537255, 1)
729732
MenuSideTopButton/styles/focus = SubResource("4694")
@@ -762,6 +765,7 @@ ScrollContainer/styles/panel = SubResource("StyleBoxEmpty_5h327")
762765
TabContainer/constants/side_margin = 30
763766
TabContainer/styles/panel = SubResource("1639")
764767
TabContainer/styles/tab_disabled = SubResource("StyleBoxFlat_hj66r")
768+
TabContainer/styles/tab_focus = SubResource("StyleBoxFlat_cejk0")
765769
TabContainer/styles/tab_hovered = SubResource("StyleBoxFlat_cejk0")
766770
TabContainer/styles/tab_selected = SubResource("StyleBoxFlat_a00um")
767771
TabContainer/styles/tab_unselected = SubResource("StyleBoxFlat_pmenl")
@@ -793,4 +797,5 @@ VSlider/styles/slider = SubResource("StyleBoxFlat_go4h4")
793797
Window/styles/embedded_border = SubResource("StyleBoxFlat_sfm0d")
794798
Window/styles/embedded_unfocused_border = SubResource("StyleBoxFlat_sfm0d")
795799
Window/styles/panel = SubResource("1662")
800+
WindowPanel/base_type = &"Window"
796801
WindowPanel/styles/panel = SubResource("StyleBoxFlat_e1x58")

scenes/config/AboutSettings.tscn

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -104,12 +104,12 @@ size_flags_horizontal = 8
104104
[node name="OpenWebsiteButton" type="Button" parent="TabContainerHandler/TabContainer/About/VBoxContainer/HBoxContainer/HFlowContainer"]
105105
unique_name_in_owner = true
106106
layout_mode = 2
107-
focus_neighbor_top = NodePath("../../../../../..")
107+
focus_neighbor_top = NodePath("../../../../..")
108108
text = "Open project website"
109109

110110
[node name="OpenIssuesButton" type="Button" parent="TabContainerHandler/TabContainer/About/VBoxContainer/HBoxContainer/HFlowContainer"]
111111
layout_mode = 2
112-
focus_neighbor_bottom = NodePath("../../../../../..")
112+
focus_neighbor_bottom = NodePath("../../../../..")
113113
text = "Report issues"
114114

115115
[node name="HSeparator" type="HSeparator" parent="TabContainerHandler/TabContainer/About/VBoxContainer"]
@@ -698,8 +698,8 @@ anchor_bottom = 1.0
698698
unique_name_in_owner = true
699699
custom_minimum_size = Vector2(200, 0)
700700
layout_mode = 2
701-
focus_neighbor_top = NodePath("../../../..")
702-
focus_neighbor_bottom = NodePath("../../../..")
701+
focus_neighbor_top = NodePath("../../..")
702+
focus_neighbor_bottom = NodePath("../../..")
703703
hide_root = true
704704

705705
[node name="AccessibilityFocus" type="Node" parent="TabContainerHandler/TabContainer/Licenses/HBoxContainer/Names"]

scenes/config/settings/InputSettings.tscn

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,6 @@ size_flags_horizontal = 3
8383
size_flags_vertical = 3
8484

8585
[node name="Keyboard" type="VBoxContainer" parent="ScrollContainer/VBoxContainer/TabContainerHandler/InputTab"]
86-
visible = false
8786
layout_mode = 2
8887
size_flags_horizontal = 3
8988
size_flags_vertical = 3
@@ -92,7 +91,6 @@ size_flags_vertical = 3
9291
unique_name_in_owner = true
9392
layout_mode = 2
9493
size_flags_horizontal = 0
95-
focus_neighbor_top = NodePath("../../..")
9694
focus_neighbor_bottom = NodePath("../HBoxContainer/VBoxContainer/HBoxContainer/KBAccept")
9795
text = "Reset to default mapping"
9896

@@ -120,6 +118,7 @@ custom_minimum_size = Vector2(60, 60)
120118
layout_mode = 2
121119
tooltip_text = "Accept"
122120
focus_neighbor_left = NodePath("../../../../KBReset")
121+
focus_neighbor_top = NodePath("../../../../KBReset")
123122
focus_neighbor_right = NodePath("../../../VBoxContainer2/HBoxContainer/KBMoveUp")
124123
icon = ExtResource("2")
125124
expand_icon = true
@@ -224,7 +223,7 @@ custom_minimum_size = Vector2(60, 60)
224223
layout_mode = 2
225224
tooltip_text = "Theme menu"
226225
focus_neighbor_right = NodePath("../../../VBoxContainer2/HBoxContainer6/KBSlideRight")
227-
focus_neighbor_bottom = NodePath("../../../../../..")
226+
focus_neighbor_bottom = NodePath("../../../../..")
228227
icon = ExtResource("8")
229228
expand_icon = true
230229
script = ExtResource("26")
@@ -249,6 +248,7 @@ text = "Move up"
249248
custom_minimum_size = Vector2(60, 60)
250249
layout_mode = 2
251250
tooltip_text = "Move up"
251+
focus_neighbor_top = NodePath("../../../../KBReset")
252252
icon = ExtResource("11")
253253
expand_icon = true
254254
script = ExtResource("26")
@@ -351,7 +351,7 @@ custom_minimum_size = Vector2(60, 60)
351351
layout_mode = 2
352352
tooltip_text = "Slide right"
353353
focus_neighbor_left = NodePath("../../../VBoxContainer/HBoxContainer6/KBThemeMenu")
354-
focus_neighbor_bottom = NodePath("../../../../../..")
354+
focus_neighbor_bottom = NodePath("../../../../..")
355355
icon = ExtResource("14")
356356
expand_icon = true
357357
script = ExtResource("26")
@@ -384,7 +384,6 @@ layout_mode = 2
384384
unique_name_in_owner = true
385385
layout_mode = 2
386386
size_flags_horizontal = 0
387-
focus_neighbor_top = NodePath("../../../../..")
388387
text = "Reset to default mapping"
389388

390389
[node name="VSeparator" type="VSeparator" parent="ScrollContainer/VBoxContainer/TabContainerHandler/InputTab/Controller/VBoxContainer/HBoxContainer4"]
@@ -394,14 +393,12 @@ layout_mode = 2
394393
unique_name_in_owner = true
395394
layout_mode = 2
396395
size_flags_horizontal = 0
397-
focus_neighbor_top = NodePath("../../../../..")
398396
text = "Create controller layout"
399397

400398
[node name="CNClearLayout" type="Button" parent="ScrollContainer/VBoxContainer/TabContainerHandler/InputTab/Controller/VBoxContainer/HBoxContainer4"]
401399
unique_name_in_owner = true
402400
layout_mode = 2
403401
size_flags_horizontal = 0
404-
focus_neighbor_top = NodePath("../../../../..")
405402
text = "Clear custom layout"
406403

407404
[node name="HBoxContainer" type="HBoxContainer" parent="ScrollContainer/VBoxContainer/TabContainerHandler/InputTab/Controller/VBoxContainer"]
@@ -628,7 +625,7 @@ custom_minimum_size = Vector2(60, 60)
628625
layout_mode = 2
629626
tooltip_text = "RetroHub menu"
630627
focus_neighbor_right = NodePath("../../../VBoxContainer2/HBoxContainer4/CNSlideRight")
631-
focus_neighbor_bottom = NodePath("../../../../../..")
628+
focus_neighbor_bottom = NodePath("../../../../..")
632629
icon = ExtResource("33_jbqxx")
633630
expand_icon = true
634631
script = ExtResource("26")
@@ -736,7 +733,7 @@ custom_minimum_size = Vector2(60, 60)
736733
layout_mode = 2
737734
tooltip_text = "Slide right"
738735
focus_neighbor_left = NodePath("../../../VBoxContainer/HBoxContainer5/CNRetroHubMenu")
739-
focus_neighbor_bottom = NodePath("../../../../../..")
736+
focus_neighbor_bottom = NodePath("../../../../..")
740737
icon = ExtResource("25")
741738
expand_icon = true
742739
script = ExtResource("26")
@@ -748,6 +745,7 @@ script = ExtResource("44")
748745
next = NodePath("../../../../../../..")
749746

750747
[node name="Virtual Keyboard" type="VBoxContainer" parent="ScrollContainer/VBoxContainer/TabContainerHandler/InputTab"]
748+
visible = false
751749
layout_mode = 2
752750
size_flags_horizontal = 3
753751
size_flags_vertical = 3
@@ -768,7 +766,6 @@ script = ExtResource("44")
768766
unique_name_in_owner = true
769767
custom_minimum_size = Vector2(180, 0)
770768
layout_mode = 2
771-
focus_neighbor_top = NodePath("../../../..")
772769
item_count = 3
773770
selected = 0
774771
popup/item_0/text = "QWERTY"
@@ -823,7 +820,7 @@ text = "On Controller Input"
823820
[node name="VirtualKeyboardOnMouse" type="CheckBox" parent="ScrollContainer/VBoxContainer/TabContainerHandler/InputTab/Virtual Keyboard/HBoxContainer2/VBoxContainer"]
824821
unique_name_in_owner = true
825822
layout_mode = 2
826-
focus_neighbor_bottom = NodePath("../../../../..")
823+
focus_neighbor_bottom = NodePath("../../../..")
827824
text = "On Mouse Click/Touch"
828825

829826
[node name="AccessibilityFocus" type="Node" parent="ScrollContainer/VBoxContainer/TabContainerHandler/InputTab/Virtual Keyboard/HBoxContainer2/VBoxContainer/VirtualKeyboardOnMouse"]

source/utils/TabContainerHandler.gd

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,22 +15,19 @@ var _focused := false
1515
func _ready():
1616
# This _ready is called before parent, we need to wait a frame for parent to initialize
1717
await get_tree().process_frame
18-
focus_mode = Control.FOCUS_ALL
19-
focus_entered.connect(_on_focus_entered)
20-
focus_exited.connect(_on_focus_exited)
2118
tab = get_child(0) if get_child_count() > 0 else null
2219
if not tab or not tab is TabContainer:
2320
push_error("TabContainerHandler has no TabContainer child! Queueing free...")
2421
queue_free()
2522
tab.tab_clicked.connect(_on_tab_clicked)
23+
tab.get_tab_bar().focus_entered.connect(_on_focus_entered)
24+
tab.get_tab_bar().focus_exited.connect(_on_focus_exited)
2625

2726
func _on_focus_entered():
2827
_focused = true
29-
tab.theme_type_variation = "HyperFocused"
3028

3129
func _on_focus_exited():
3230
_focused = false
33-
tab.theme_type_variation = ""
3431

3532
func _input(event):
3633
if is_visible_in_tree():
@@ -71,7 +68,8 @@ func _on_tab_clicked(_tab_idx: int):
7168
handle_focus(not _focused)
7269

7370
func handle_focus(enter_tab: bool):
74-
RetroHubUI.play_sound(RetroHubUI.AudioKeys.SLIDE)
71+
if not enter_tab:
72+
RetroHubUI.play_sound(RetroHubUI.AudioKeys.SLIDE)
7573
await get_tree().process_frame
7674
if signal_tab_change:
7775
emit_signal("tab_changed", tab, enter_tab)

source/utils/UIAudio.gd

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,9 +89,7 @@ func connect_signals(node: Node):
8989
node.visibility_changed.connect(_window_visibility_changed.bind(node))
9090
elif node is Range:
9191
node.value_changed.connect(range_value_changed.bind(node))
92-
elif node is TabContainerHandler:
93-
node.tab_changed.connect(tab_container_handler_changed.bind(node))
94-
elif node is TabContainer:
92+
elif node is TabBar:
9593
node.tab_changed.connect(tab_container_tab_changed.bind(node))
9694
elif node is Tree:
9795
node.item_selected.connect(_tree_item_or_cell_selected.bind(node))

0 commit comments

Comments
 (0)