Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions assets/icons/LeftArrow.tres
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[gd_resource type="AtlasTexture" format=3 uid="uid://dx80soewvmafg"]

[ext_resource type="Texture2D" uid="uid://cg0l7tvqmtghr" path="res://assets/sprites/sheet_white1x.png" id="1_gnh83"]

[resource]
atlas = ExtResource("1_gnh83")
region = Rect2(0, 250, 50, 50)
19 changes: 18 additions & 1 deletion de.po
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ msgstr ""
"\n"
"[center][b]Powered By[/b][/center]\n"
"[center][img=200x200,center,center]res://icon.svg[/img][/center]\n"
"[center]Godot Game Engine 4.6[/center]"
"[center]Godot Game Engine 4.7[/center]"

#: entities/ui/credits/scenes/Credits.tscn
#: entities/ui/deck_viewer/scenes/DeckViewer.tscn
Expand Down Expand Up @@ -1483,6 +1483,23 @@ msgstr "UI: %03.0f %%"
msgid "RESET_SCALING"
msgstr "UI Skalierung zurücksetzten"

#. TRANSLATORS: Can contain a "%DATE%" palceholder, which is getting replaced by the event date
#: shared/resources/translations/assets/SamuelBirthdayEventBody.tres
msgid "SAMUEL_BIRTHDAY_EVENT_TEXT"
msgstr ""
"Alles gute zu deinem Geburtstag [wave amp=50.0 freq=5.0 connected=1]Samuel[/"
"wave], du bist ab heute [b]%DIFFERENCE% Jahre[/b] alt."

#: shared/resources/translations/assets/BirthdayEventHeadline.tres
msgid "BIRTHDAY_EVENT_HEADLINE"
msgstr "Geburtstag"

#: shared/resources/translations/assets/SamoryBirthDayText.tres
msgid "SAMORY_BIRTHDAY_EVENT_TEXT"
msgstr ""
"Der Tag an dem dieses Spiel erstellt worden ist. Samory wird heute also [b]"
"%DIFFERENCE% Jahre[/b] alt."

msgid "Samory"
msgstr ""

Expand Down
19 changes: 18 additions & 1 deletion en.po
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ msgstr ""
"\n"
"[center][b]Powered By[/b][/center]\n"
"[center][img=200x200,center,center]res://icon.svg[/img][/center]\n"
"[center]Godot Game Engine 4.6[/center]"
"[center]Godot Game Engine 4.7[/center]"

#: entities/ui/credits/scenes/Credits.tscn
#: entities/ui/deck_viewer/scenes/DeckViewer.tscn
Expand Down Expand Up @@ -1390,6 +1390,23 @@ msgstr "UI Scale: %03.0f %%"
msgid "RESET_SCALING"
msgstr "Reset UI scaling"

#. TRANSLATORS: Can contain a "%DATE%" palceholder, which is getting replaced by the event date
#: shared/resources/translations/assets/SamuelBirthdayEventBody.tres
msgid "SAMUEL_BIRTHDAY_EVENT_TEXT"
msgstr ""
"Happy birthday [wave amp=50.0 freq=5.0 connected=1]Samuel[/wave], you are [b]"
"%DIFFERENCE% years[/b] old now."

#: shared/resources/translations/assets/BirthdayEventHeadline.tres
msgid "BIRTHDAY_EVENT_HEADLINE"
msgstr "Birthday"

#: shared/resources/translations/assets/SamoryBirthDayText.tres
msgid "SAMORY_BIRTHDAY_EVENT_TEXT"
msgstr ""
"The day this game was created initially. Samory is [b]%DIFFERENCE% years[/b] "
"old today."

msgid "Samory"
msgstr ""

Expand Down
68 changes: 44 additions & 24 deletions entities/ui/main_menu/scenes/MainMenu.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@
[ext_resource type="PackedScene" uid="uid://ded0xyxbb1om1" path="res://entities/ui/settings_menu/scenes/SettingsMenu.tscn" id="21_plb04"]
[ext_resource type="Resource" uid="uid://c1inbmbft2wj0" path="res://shared/resources/control_animation/resources/FadeInAnimation.tres" id="28_0jj68"]
[ext_resource type="PackedScene" uid="uid://c6411vrwwcrjs" path="res://entities/ui/animation_arrow_up/scenes/AnimationArrowUp.tscn" id="28_exu4r"]
[ext_resource type="PackedScene" uid="uid://bb8a06skydqwe" path="res://entities/ui/special_event_area/scenes/SpecialEventArea.tscn" id="31_seyqs"]
[ext_resource type="Script" uid="uid://cbevbiicfyjvm" path="res://entities/ui/special_event_area/scripts/SpecialEvent.gd" id="32_v1oo8"]
[ext_resource type="Resource" uid="uid://ran18u8hj7hb" path="res://entities/ui/special_event_area/events/SamuelBirthdayEvent.tres" id="33_bpb6p"]
[ext_resource type="Resource" uid="uid://n7irgub8gja5" path="res://entities/ui/special_event_area/events/SamoryBirthdayEvent.tres" id="34_bpb6p"]

[sub_resource type="Resource" id="Resource_exu4r"]
script = ExtResource("4_psgpi")
Expand Down Expand Up @@ -238,8 +242,8 @@ metadata/_custom_type_script = "uid://rxshx7ma8nn3"
[node name="Quit" type="Button" parent="CenterMainMenu/PanelContainer/MarginContainer/VBoxContainer" unique_id=1120827469]
layout_mode = 2
tooltip_text = "QUIT_GAME_TOOLTIP"
focus_neighbor_right = NodePath("../../../../../BottomDock/VBoxContainer/Links/HowToPlay")
focus_neighbor_bottom = NodePath("../../../../../BottomDock/VBoxContainer/Links/HowToPlay")
focus_neighbor_right = NodePath("../../../../../BottomRightDock/VBoxContainer/Links/HowToPlay")
focus_neighbor_bottom = NodePath("../../../../../BottomRightDock/VBoxContainer/Links/HowToPlay")
focus_next = NodePath("../Start Game")
text = "QUIT_GAME"
icon = ExtResource("15_lppid")
Expand Down Expand Up @@ -293,7 +297,7 @@ size_flags_horizontal = 10
size_flags_vertical = 0
tooltip_text = "GAME_SETTINGS"
focus_neighbor_left = NodePath("../../../CenterMainMenu/PanelContainer/MarginContainer/VBoxContainer/Start Game")
focus_neighbor_bottom = NodePath("../../../BottomDock/VBoxContainer/Links/HowToPlay")
focus_neighbor_bottom = NodePath("../../../BottomRightDock/VBoxContainer/Links/HowToPlay")
focus_next = NodePath("../../../CenterMainMenu/PanelContainer/MarginContainer/VBoxContainer/Start Game")
focus_previous = NodePath("../../../CenterMainMenu/PanelContainer/MarginContainer/VBoxContainer/Start Game")
icon = ExtResource("20_vm73v")
Expand All @@ -307,7 +311,7 @@ enter_values = SubResource("Resource_psgpi")
hover_values = ExtResource("9_exu4r")
metadata/_custom_type_script = "uid://rxshx7ma8nn3"

[node name="BottomDock" type="MarginContainer" parent="." unique_id=1158314847]
[node name="BottomRightDock" type="MarginContainer" parent="." unique_id=1158314847]
anchors_preset = 3
anchor_left = 1.0
anchor_top = 1.0
Expand All @@ -325,53 +329,69 @@ theme_override_constants/margin_top = 10
theme_override_constants/margin_right = 10
theme_override_constants/margin_bottom = 10

[node name="ControlAnimationComponent" type="Node" parent="BottomDock" unique_id=392816729 node_paths=PackedStringArray("await_component")]
[node name="ControlAnimationComponent" type="Node" parent="BottomRightDock" unique_id=392816729 node_paths=PackedStringArray("await_component")]
script = ExtResource("3_aqmwr")
await_component = NodePath("../../CenterMainMenu/PanelContainer/MarginContainer/VBoxContainer/Quit/ControlAnimationComponent")
enter_values = ExtResource("28_0jj68")
hover_values = SubResource("Resource_0jj68")
metadata/_custom_type_script = "uid://rxshx7ma8nn3"

[node name="VBoxContainer" type="VBoxContainer" parent="BottomDock" unique_id=422140136]
[node name="VBoxContainer" type="VBoxContainer" parent="BottomRightDock" unique_id=422140136]
layout_mode = 2

[node name="TextureRect" parent="BottomDock/VBoxContainer" unique_id=1988116494 instance=ExtResource("28_exu4r")]
[node name="TextureRect" parent="BottomRightDock/VBoxContainer" unique_id=1988116494 instance=ExtResource("28_exu4r")]
layout_mode = 2

[node name="Links" parent="BottomDock/VBoxContainer" unique_id=31784573 instance=ExtResource("21_fr5td")]
[node name="Links" parent="BottomRightDock/VBoxContainer" unique_id=31784573 instance=ExtResource("21_fr5td")]
layout_mode = 2

[node name="OpenCustomDeckFolder" parent="BottomDock/VBoxContainer/Links" index="0" unique_id=2116555998]
[node name="OpenCustomDeckFolder" parent="BottomRightDock/VBoxContainer/Links" index="0" unique_id=2116555998]
focus_neighbor_left = NodePath("../../../../CenterMainMenu/PanelContainer/MarginContainer/VBoxContainer/Quit")
focus_neighbor_top = NodePath("../../../../CenterMainMenu/PanelContainer/MarginContainer/VBoxContainer/Quit")

[node name="HowToPlay" parent="BottomDock/VBoxContainer/Links" index="1" unique_id=1979169242]
[node name="HowToPlay" parent="BottomRightDock/VBoxContainer/Links" index="1" unique_id=1979169242]
focus_neighbor_top = NodePath("../../../../CenterMainMenu/PanelContainer/MarginContainer/VBoxContainer/Quit")
focus_previous = NodePath("../../../../CenterMainMenu/PanelContainer/MarginContainer/VBoxContainer/Quit")

[node name="GitHubRepository" parent="BottomDock/VBoxContainer/Links" index="2" unique_id=511307644]
[node name="GitHubRepository" parent="BottomRightDock/VBoxContainer/Links" index="2" unique_id=511307644]
focus_neighbor_top = NodePath("../../../../CenterMainMenu/PanelContainer/MarginContainer/VBoxContainer/Quit")

[node name="OpenGameSite" parent="BottomDock/VBoxContainer/Links" index="3" unique_id=540372814]
[node name="OpenGameSite" parent="BottomRightDock/VBoxContainer/Links" index="3" unique_id=540372814]
focus_neighbor_top = NodePath("../../../../CenterMainMenu/PanelContainer/MarginContainer/VBoxContainer/Quit")

[node name="ReportBug" parent="BottomDock/VBoxContainer/Links" index="4" unique_id=129169406]
[node name="ReportBug" parent="BottomRightDock/VBoxContainer/Links" index="4" unique_id=129169406]
focus_neighbor_top = NodePath("../../../../CenterMainMenu/PanelContainer/MarginContainer/VBoxContainer/Quit")

[node name="BottomLeftDock" type="MarginContainer" parent="." unique_id=1649400178]
anchors_preset = 12
anchor_top = 1.0
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 0
size_flags_horizontal = 3
size_flags_vertical = 3
theme_override_constants/margin_left = 10
theme_override_constants/margin_bottom = 10

[node name="SpecialEventArea" parent="BottomLeftDock" unique_id=1164238996 instance=ExtResource("31_seyqs")]
layout_mode = 2
all_events = Array[ExtResource("32_v1oo8")]([ExtResource("33_bpb6p"), ExtResource("34_bpb6p")])

[connection signal="pressed" from="CenterMainMenu/PanelContainer/MarginContainer/VBoxContainer/Quick Game AI" to="AvailableAiModes" method="toggle_menu"]
[connection signal="enter_animation_done" from="CenterMainMenu/PanelContainer/MarginContainer/VBoxContainer/Quit/ControlAnimationComponent" to="CenterMainMenu/PanelContainer/MarginContainer/VBoxContainer/Start Game" method="focused"]
[connection signal="hiding_container" from="AvailableAiModes" to="CenterMainMenu/PanelContainer/MarginContainer/VBoxContainer/Quick Game AI" method="neighbor_hidden"]
[connection signal="showing_container" from="AvailableAiModes" to="CenterMainMenu/PanelContainer/MarginContainer/VBoxContainer/Quick Game AI" method="neighbor_shown"]
[connection signal="focus_entered" from="BottomDock/VBoxContainer/Links/OpenCustomDeckFolder" to="BottomDock/ControlAnimationComponent" method="trigger_hover"]
[connection signal="focus_exited" from="BottomDock/VBoxContainer/Links/OpenCustomDeckFolder" to="BottomDock/ControlAnimationComponent" method="trigger_hover_lost"]
[connection signal="focus_entered" from="BottomDock/VBoxContainer/Links/HowToPlay" to="BottomDock/ControlAnimationComponent" method="trigger_hover"]
[connection signal="focus_exited" from="BottomDock/VBoxContainer/Links/HowToPlay" to="BottomDock/ControlAnimationComponent" method="trigger_hover_lost"]
[connection signal="focus_entered" from="BottomDock/VBoxContainer/Links/GitHubRepository" to="BottomDock/ControlAnimationComponent" method="trigger_hover"]
[connection signal="focus_exited" from="BottomDock/VBoxContainer/Links/GitHubRepository" to="BottomDock/ControlAnimationComponent" method="trigger_hover_lost"]
[connection signal="focus_entered" from="BottomDock/VBoxContainer/Links/OpenGameSite" to="BottomDock/ControlAnimationComponent" method="trigger_hover"]
[connection signal="focus_exited" from="BottomDock/VBoxContainer/Links/OpenGameSite" to="BottomDock/ControlAnimationComponent" method="trigger_hover_lost"]
[connection signal="focus_entered" from="BottomDock/VBoxContainer/Links/ReportBug" to="BottomDock/ControlAnimationComponent" method="trigger_hover"]
[connection signal="focus_exited" from="BottomDock/VBoxContainer/Links/ReportBug" to="BottomDock/ControlAnimationComponent" method="trigger_hover_lost"]
[connection signal="focus_entered" from="BottomRightDock/VBoxContainer/Links/OpenCustomDeckFolder" to="BottomRightDock/ControlAnimationComponent" method="trigger_hover"]
[connection signal="focus_exited" from="BottomRightDock/VBoxContainer/Links/OpenCustomDeckFolder" to="BottomRightDock/ControlAnimationComponent" method="trigger_hover_lost"]
[connection signal="focus_entered" from="BottomRightDock/VBoxContainer/Links/HowToPlay" to="BottomRightDock/ControlAnimationComponent" method="trigger_hover"]
[connection signal="focus_exited" from="BottomRightDock/VBoxContainer/Links/HowToPlay" to="BottomRightDock/ControlAnimationComponent" method="trigger_hover_lost"]
[connection signal="focus_entered" from="BottomRightDock/VBoxContainer/Links/GitHubRepository" to="BottomRightDock/ControlAnimationComponent" method="trigger_hover"]
[connection signal="focus_exited" from="BottomRightDock/VBoxContainer/Links/GitHubRepository" to="BottomRightDock/ControlAnimationComponent" method="trigger_hover_lost"]
[connection signal="focus_entered" from="BottomRightDock/VBoxContainer/Links/OpenGameSite" to="BottomRightDock/ControlAnimationComponent" method="trigger_hover"]
[connection signal="focus_exited" from="BottomRightDock/VBoxContainer/Links/OpenGameSite" to="BottomRightDock/ControlAnimationComponent" method="trigger_hover_lost"]
[connection signal="focus_entered" from="BottomRightDock/VBoxContainer/Links/ReportBug" to="BottomRightDock/ControlAnimationComponent" method="trigger_hover"]
[connection signal="focus_exited" from="BottomRightDock/VBoxContainer/Links/ReportBug" to="BottomRightDock/ControlAnimationComponent" method="trigger_hover_lost"]

[editable path="AvailableAiModes"]
[editable path="BottomDock/VBoxContainer/Links"]
[editable path="BottomRightDock/VBoxContainer/Links"]
14 changes: 14 additions & 0 deletions entities/ui/special_event_area/events/SamoryBirthdayEvent.tres
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[gd_resource type="Resource" script_class="SpecialEvent" format=3 uid="uid://n7irgub8gja5"]

[ext_resource type="Script" uid="uid://cbevbiicfyjvm" path="res://entities/ui/special_event_area/scripts/SpecialEvent.gd" id="1_bedju"]
[ext_resource type="Resource" uid="uid://bg2bjo5tx1kuf" path="res://shared/resources/translations/assets/BirthdayEventHeadline.tres" id="1_wcubf"]
[ext_resource type="Resource" uid="uid://01yj14dlfdyg" path="res://shared/resources/translations/assets/SamoryBirthDayText.tres" id="2_uw6gj"]

[resource]
script = ExtResource("1_bedju")
event_name = ExtResource("1_wcubf")
event_text = ExtResource("2_uw6gj")
valid_month = 10
valid_day = 4
year = 2024
metadata/_custom_type_script = "uid://cbevbiicfyjvm"
14 changes: 14 additions & 0 deletions entities/ui/special_event_area/events/SamuelBirthdayEvent.tres
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[gd_resource type="Resource" script_class="SpecialEvent" format=3 uid="uid://ran18u8hj7hb"]

[ext_resource type="Resource" uid="uid://bg2bjo5tx1kuf" path="res://shared/resources/translations/assets/BirthdayEventHeadline.tres" id="1_4v6lf"]
[ext_resource type="Resource" uid="uid://ipxe810ybd0w" path="res://shared/resources/translations/assets/SamuelBirthdayEventBody.tres" id="2_lb4pf"]
[ext_resource type="Script" uid="uid://cbevbiicfyjvm" path="res://entities/ui/special_event_area/scripts/SpecialEvent.gd" id="3_vt4fd"]

[resource]
script = ExtResource("3_vt4fd")
event_name = ExtResource("1_4v6lf")
event_text = ExtResource("2_lb4pf")
valid_month = 7
valid_day = 31
year = 2021
metadata/_custom_type_script = "uid://cbevbiicfyjvm"
57 changes: 57 additions & 0 deletions entities/ui/special_event_area/scenes/SpecialEventArea.tscn
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
[gd_scene format=3 uid="uid://bb8a06skydqwe"]

[ext_resource type="Script" uid="uid://bq7jwpndnhsso" path="res://entities/ui/special_event_area/scripts/SpecialEventArea.gd" id="1_5gav4"]
[ext_resource type="Script" uid="uid://cbevbiicfyjvm" path="res://entities/ui/special_event_area/scripts/SpecialEvent.gd" id="2_nrjy8"]
[ext_resource type="Texture2D" uid="uid://dx80soewvmafg" path="res://assets/icons/LeftArrow.tres" id="2_vmcdl"]
[ext_resource type="Texture2D" uid="uid://dkm1d2mijfcuq" path="res://assets/icons/PlayIcon.tres" id="3_dmn6f"]
[ext_resource type="Resource" uid="uid://ran18u8hj7hb" path="res://entities/ui/special_event_area/events/SamuelBirthdayEvent.tres" id="3_liv2w"]
[ext_resource type="Script" uid="uid://r7qpm6e1ckoh" path="res://entities/ui/special_event_area/scripts/ContentArea.gd" id="4_liv2w"]

[node name="SpecialEventArea" type="Control" unique_id=1313493604]
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
script = ExtResource("1_5gav4")
all_events = Array[ExtResource("2_nrjy8")]([ExtResource("3_liv2w")])
metadata/_custom_type_script = "uid://bq7jwpndnhsso"

[node name="SpecialEventContainer" type="PanelContainer" parent="." unique_id=1294849520]
layout_mode = 1
anchors_preset = 2
anchor_top = 1.0
anchor_bottom = 1.0
offset_top = -112.0
offset_right = 289.0
grow_vertical = 0

[node name="SpecialEventHBox" type="HBoxContainer" parent="SpecialEventContainer" unique_id=1996837038]
layout_mode = 2

[node name="PreviousEventButton" type="Button" parent="SpecialEventContainer/SpecialEventHBox" unique_id=1014056051]
layout_mode = 2
size_flags_horizontal = 0
size_flags_vertical = 4
icon = ExtResource("2_vmcdl")

[node name="ContentArea" type="MarginContainer" parent="SpecialEventContainer/SpecialEventHBox" unique_id=1352675529]
unique_name_in_owner = true
layout_mode = 2
size_flags_horizontal = 3
script = ExtResource("4_liv2w")
metadata/_custom_type_script = "uid://r7qpm6e1ckoh"

[node name="NextEventButton" type="Button" parent="SpecialEventContainer/SpecialEventHBox" unique_id=147454204]
layout_mode = 2
size_flags_horizontal = 8
size_flags_vertical = 4
tooltip_text = "NEXT_EVENT_DESCRIPTION"
icon = ExtResource("3_dmn6f")

[connection signal="add_event" from="." to="SpecialEventContainer/SpecialEventHBox/ContentArea" method="add_event"]
[connection signal="single_event" from="." to="SpecialEventContainer/SpecialEventHBox/PreviousEventButton" method="hide"]
[connection signal="single_event" from="." to="SpecialEventContainer/SpecialEventHBox/NextEventButton" method="hide"]
[connection signal="pressed" from="SpecialEventContainer/SpecialEventHBox/PreviousEventButton" to="SpecialEventContainer/SpecialEventHBox/ContentArea" method="show_previous"]
[connection signal="pressed" from="SpecialEventContainer/SpecialEventHBox/NextEventButton" to="SpecialEventContainer/SpecialEventHBox/ContentArea" method="show_next"]
28 changes: 28 additions & 0 deletions entities/ui/special_event_area/scenes/SpecialEventBox.tscn
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
[gd_scene format=3 uid="uid://dw55fdvpcr70e"]

[ext_resource type="Script" uid="uid://clqfhgkyd03c8" path="res://entities/ui/special_event_area/scripts/SpecialEventBox.gd" id="1_kmhj8"]
[ext_resource type="StyleBox" uid="uid://d1rhal5rp1608" path="res://assets/styles/panel/MetalBox.tres" id="1_lrji4"]

[node name="SpecialEventBox" type="PanelContainer" unique_id=1870634146]
anchors_preset = 2
anchor_top = 1.0
anchor_bottom = 1.0
offset_top = -644.0
offset_right = 33.0
grow_vertical = 0
size_flags_horizontal = 3
size_flags_vertical = 4
theme_override_styles/panel = ExtResource("1_lrji4")
script = ExtResource("1_kmhj8")
metadata/_custom_type_script = "uid://clqfhgkyd03c8"

[node name="RichTextLabel" type="RichTextLabel" parent="." unique_id=152967713]
custom_minimum_size = Vector2(350, 50)
custom_maximum_size = Vector2(350, 150)
layout_mode = 2
size_flags_vertical = 4
bbcode_enabled = true
text = "EVENT_PLACEHOLDER"
fit_content = true

[connection signal="text_changed" from="." to="RichTextLabel" method="set_text"]
31 changes: 31 additions & 0 deletions entities/ui/special_event_area/scripts/ContentArea.gd
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
class_name SpecialEventContentArea extends MarginContainer

@export var event_box_template: PackedScene = preload("res://entities/ui/special_event_area/scenes/SpecialEventBox.tscn")

func add_event(new_event: SpecialEvent) -> void:
var box: SpecialEventBox = event_box_template.instantiate() as SpecialEventBox
box.set_event(new_event)
box.visible = get_child_count() == 0
add_child(box)

func show_next() -> void:
var index: int = get_children().find_custom(func (child: SpecialEventBox) -> bool: return child.visible)
var current_active: SpecialEventBox = get_children()[index] as SpecialEventBox
index += 1
if index >= get_child_count():
index = 0
var next_active: SpecialEventBox = get_children()[index] as SpecialEventBox

current_active.visible = false
next_active.visible = true

func show_previous() -> void:
var index: int = get_children().find_custom(func (child: SpecialEventBox) -> bool: return child.visible)
var current_active: SpecialEventBox = get_children()[index] as SpecialEventBox
index -= 1
if index < 0:
index = get_child_count() - 1
var next_active: SpecialEventBox = get_children()[index] as SpecialEventBox
current_active.visible = false
next_active.visible = true

1 change: 1 addition & 0 deletions entities/ui/special_event_area/scripts/ContentArea.gd.uid
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
uid://r7qpm6e1ckoh
Loading
Loading