aboutsummaryrefslogtreecommitdiff
path: root/game/src/GameSession
diff options
context:
space:
mode:
Diffstat (limited to 'game/src/GameSession')
-rw-r--r--game/src/GameSession/GameSession.gd16
-rw-r--r--game/src/GameSession/GameSession.tscn40
-rw-r--r--game/src/GameSession/GameSessionMenu.gd19
-rw-r--r--game/src/GameSession/GameSessionMenu.tscn28
-rw-r--r--game/src/GameSession/MapControlPanel.gd8
-rw-r--r--game/src/GameSession/MapControlPanel.tscn32
6 files changed, 143 insertions, 0 deletions
diff --git a/game/src/GameSession/GameSession.gd b/game/src/GameSession/GameSession.gd
new file mode 100644
index 0000000..0d69bf2
--- /dev/null
+++ b/game/src/GameSession/GameSession.gd
@@ -0,0 +1,16 @@
+extends Control
+
+@export var _game_session_menu : Control
+
+func _ready():
+ print("GameSession ready")
+
+# REQUIREMENTS:
+# * SS-42
+func _on_game_session_menu_button_pressed():
+ _game_session_menu.visible = !_game_session_menu.visible
+
+# REQUIREMENTS:
+# * SS-64
+func _on_game_session_menu_close_button_pressed():
+ _game_session_menu.hide()
diff --git a/game/src/GameSession/GameSession.tscn b/game/src/GameSession/GameSession.tscn
new file mode 100644
index 0000000..f984daf
--- /dev/null
+++ b/game/src/GameSession/GameSession.tscn
@@ -0,0 +1,40 @@
+[gd_scene load_steps=4 format=3 uid="uid://bgnupcshe1m7r"]
+
+[ext_resource type="Script" path="res://src/GameSession/GameSession.gd" id="1_eklvp"]
+[ext_resource type="PackedScene" uid="uid://g524p8lr574w" path="res://src/GameSession/MapControlPanel.tscn" id="3_afh6d"]
+[ext_resource type="PackedScene" uid="uid://dvdynl6eir40o" path="res://src/GameSession/GameSessionMenu.tscn" id="3_bvmqh"]
+
+[node name="GameSession" type="Control" node_paths=PackedStringArray("_game_session_menu")]
+editor_description = "SS-102"
+layout_mode = 3
+anchors_preset = 15
+anchor_right = 1.0
+anchor_bottom = 1.0
+grow_horizontal = 2
+grow_vertical = 2
+script = ExtResource("1_eklvp")
+_game_session_menu = NodePath("GameSessionMenu")
+
+[node name="GameSessionMenu" parent="." instance=ExtResource("3_bvmqh")]
+visible = false
+layout_mode = 1
+anchors_preset = 8
+anchor_left = 0.5
+anchor_top = 0.5
+anchor_right = 0.5
+anchor_bottom = 0.5
+grow_horizontal = 2
+grow_vertical = 2
+
+[node name="MapControlPanel" parent="." instance=ExtResource("3_afh6d")]
+layout_mode = 1
+anchors_preset = 3
+anchor_left = 1.0
+anchor_top = 1.0
+anchor_right = 1.0
+anchor_bottom = 1.0
+grow_horizontal = 0
+grow_vertical = 0
+
+[connection signal="close_button_pressed" from="GameSessionMenu" to="." method="_on_game_session_menu_close_button_pressed"]
+[connection signal="game_session_menu_button_pressed" from="MapControlPanel" to="." method="_on_game_session_menu_button_pressed"]
diff --git a/game/src/GameSession/GameSessionMenu.gd b/game/src/GameSession/GameSessionMenu.gd
new file mode 100644
index 0000000..3722b52
--- /dev/null
+++ b/game/src/GameSession/GameSessionMenu.gd
@@ -0,0 +1,19 @@
+extends PanelContainer
+
+signal close_button_pressed
+
+@export var _main_menu_scene : PackedScene
+
+func _ready():
+ print("GameSessionMenu ready")
+
+# REQUIREMENTS:
+# * SS-47
+# * UIFUN-69
+func _on_to_main_menu_pressed():
+ get_tree().change_scene_to_packed(_main_menu_scene)
+
+# REQUIREMENTS:
+# * UIFUN-69
+func _on_close_button_pressed():
+ close_button_pressed.emit()
diff --git a/game/src/GameSession/GameSessionMenu.tscn b/game/src/GameSession/GameSessionMenu.tscn
new file mode 100644
index 0000000..d6a7ca9
--- /dev/null
+++ b/game/src/GameSession/GameSessionMenu.tscn
@@ -0,0 +1,28 @@
+[gd_scene load_steps=3 format=3 uid="uid://dvdynl6eir40o"]
+
+[ext_resource type="Script" path="res://src/GameSession/GameSessionMenu.gd" id="1_usq6o"]
+[ext_resource type="PackedScene" uid="uid://o4u142w4qkln" path="res://src/GameMenu.tscn" id="2_xi6a4"]
+
+[node name="GameSessionMenu" type="PanelContainer"]
+editor_description = "UI-68"
+script = ExtResource("1_usq6o")
+_main_menu_scene = ExtResource("2_xi6a4")
+
+[node name="VBoxContainer" type="VBoxContainer" parent="."]
+layout_mode = 2
+
+[node name="MainMenuButton" type="Button" parent="VBoxContainer"]
+editor_description = "UI-71"
+layout_mode = 2
+text = "Resign"
+
+[node name="HSeparator" type="HSeparator" parent="VBoxContainer"]
+layout_mode = 2
+
+[node name="CloseButton" type="Button" parent="VBoxContainer"]
+editor_description = "UI-80"
+layout_mode = 2
+text = "Close"
+
+[connection signal="pressed" from="VBoxContainer/MainMenuButton" to="." method="_on_to_main_menu_pressed"]
+[connection signal="pressed" from="VBoxContainer/CloseButton" to="." method="_on_close_button_pressed"]
diff --git a/game/src/GameSession/MapControlPanel.gd b/game/src/GameSession/MapControlPanel.gd
new file mode 100644
index 0000000..ad56536
--- /dev/null
+++ b/game/src/GameSession/MapControlPanel.gd
@@ -0,0 +1,8 @@
+extends PanelContainer
+
+signal game_session_menu_button_pressed
+
+# REQUIREMENTS:
+# * UIFUN-10
+func _on_game_session_menu_button_pressed():
+ game_session_menu_button_pressed.emit()
diff --git a/game/src/GameSession/MapControlPanel.tscn b/game/src/GameSession/MapControlPanel.tscn
new file mode 100644
index 0000000..71d43e7
--- /dev/null
+++ b/game/src/GameSession/MapControlPanel.tscn
@@ -0,0 +1,32 @@
+[gd_scene load_steps=2 format=3 uid="uid://g524p8lr574w"]
+
+[ext_resource type="Script" path="res://src/GameSession/MapControlPanel.gd" id="1_ign64"]
+
+[node name="PanelContainer" type="PanelContainer"]
+editor_description = "SS-103"
+script = ExtResource("1_ign64")
+
+[node name="HBoxContainer" type="HBoxContainer" parent="."]
+layout_mode = 2
+
+[node name="VBoxContainer" type="VBoxContainer" parent="HBoxContainer"]
+layout_mode = 2
+
+[node name="MapmodesPlaceholder" type="Label" parent="HBoxContainer/VBoxContainer"]
+layout_mode = 2
+text = "MAPMODES"
+
+[node name="MinimapPlaceholder" type="Label" parent="HBoxContainer/VBoxContainer"]
+layout_mode = 2
+text = "MINIMAP"
+
+[node name="AuxiliaryPanel" type="VBoxContainer" parent="HBoxContainer"]
+editor_description = "UI-761"
+layout_mode = 2
+
+[node name="GameSessionMenuButton" type="Button" parent="HBoxContainer/AuxiliaryPanel"]
+editor_description = "UI-9"
+layout_mode = 2
+text = "ESC"
+
+[connection signal="pressed" from="HBoxContainer/AuxiliaryPanel/GameSessionMenuButton" to="." method="_on_game_session_menu_button_pressed"]