aboutsummaryrefslogtreecommitdiff
path: root/game/src/GameSession
diff options
context:
space:
mode:
Diffstat (limited to 'game/src/GameSession')
-rw-r--r--game/src/GameSession/GameSession.tscn24
-rw-r--r--game/src/GameSession/GameSessionMenu.gd48
-rw-r--r--game/src/GameSession/GameSessionMenu.tscn48
-rw-r--r--game/src/GameSession/GameSpeedPanel.gd2
-rw-r--r--game/src/GameSession/GameSpeedPanel.tscn32
-rw-r--r--game/src/GameSession/MapControlPanel.tscn51
-rw-r--r--game/src/GameSession/MapView.gd8
-rw-r--r--game/src/GameSession/ProvinceOverviewPanel.gd2
-rw-r--r--game/src/GameSession/ProvinceOverviewPanel.tscn59
9 files changed, 174 insertions, 100 deletions
diff --git a/game/src/GameSession/GameSession.tscn b/game/src/GameSession/GameSession.tscn
index 8a8b18c..b993acf 100644
--- a/game/src/GameSession/GameSession.tscn
+++ b/game/src/GameSession/GameSession.tscn
@@ -21,15 +21,6 @@ mouse_filter = 2
script = ExtResource("1_eklvp")
_game_session_menu = NodePath("GameSessionMenu")
-[node name="MusicPlayer" parent="." instance=ExtResource("2_kt6aa")]
-layout_mode = 1
-anchors_preset = 1
-anchor_left = 1.0
-anchor_right = 1.0
-offset_left = -150.0
-offset_bottom = 110.0
-grow_horizontal = 0
-
[node name="MapView" parent="." instance=ExtResource("4_xkg5j")]
[node name="GameSessionMenu" parent="." instance=ExtResource("3_bvmqh")]
@@ -56,12 +47,23 @@ grow_vertical = 0
[node name="ProvinceOverviewPanel" parent="." instance=ExtResource("5_osjnn")]
layout_mode = 1
+[node name="GameSpeedPanel" parent="." instance=ExtResource("7_myy4q")]
+layout_mode = 0
+offset_right = 302.0
+offset_bottom = 31.0
+
[node name="OptionsMenu" parent="." instance=ExtResource("6_p5mnx")]
visible = false
layout_mode = 1
-[node name="GameSpeedPanel" parent="." instance=ExtResource("7_myy4q")]
-layout_mode = 0
+[node name="MusicPlayer" parent="." instance=ExtResource("2_kt6aa")]
+layout_mode = 1
+anchors_preset = 1
+anchor_left = 1.0
+anchor_right = 1.0
+offset_left = -150.0
+offset_right = 0.0
+grow_horizontal = 0
[connection signal="map_view_camera_changed" from="MapView" to="MapControlPanel" method="_on_map_view_camera_changed"]
[connection signal="province_selected" from="MapView" to="ProvinceOverviewPanel" method="_on_province_selected"]
diff --git a/game/src/GameSession/GameSessionMenu.gd b/game/src/GameSession/GameSessionMenu.gd
index 7d785ca..70a1630 100644
--- a/game/src/GameSession/GameSessionMenu.gd
+++ b/game/src/GameSession/GameSessionMenu.gd
@@ -2,8 +2,45 @@ extends PanelContainer
@export var _main_menu_scene : PackedScene
+@export var _main_menu_dialog : AcceptDialog
+@export var _quit_dialog : AcceptDialog
+
+var _main_menu_save_button : Button
+var _main_menu_save_separator : Control
+var _quit_save_button : Button
+var _quit_save_separator : Control
+
signal options_button_pressed
+func _ready() -> void:
+ _main_menu_save_button = _main_menu_dialog.add_button("DIALOG_SAVE_AND_RESIGN", true, &"save_and_main_menu")
+ _quit_save_button = _quit_dialog.add_button("DIALOG_SAVE_AND_QUIT", true, &"save_and_quit")
+
+ # Neccessary to center the save buttons and preserve the reference to the separator elements
+ var dialog_hbox : HBoxContainer = _main_menu_dialog.get_child(2, true)
+ var index := _main_menu_save_button.get_index(true)
+ dialog_hbox.move_child(_main_menu_save_button, _main_menu_dialog.get_ok_button().get_index(true))
+ dialog_hbox.move_child(_main_menu_dialog.get_ok_button(), index)
+ _main_menu_save_separator = dialog_hbox.get_child(_main_menu_save_button.get_index(true) - 1)
+
+ dialog_hbox = _quit_dialog.get_child(2, true)
+ index = _quit_save_button.get_index(true)
+ dialog_hbox.move_child(_quit_save_button, _quit_dialog.get_ok_button().get_index(true))
+ dialog_hbox.move_child(_quit_dialog.get_ok_button(), index)
+ _quit_save_separator = dialog_hbox.get_child(_quit_save_button.get_index(true) - 1)
+
+func hide_save_dialog_button() -> void:
+ _main_menu_save_button.hide()
+ _main_menu_save_separator.hide()
+ _quit_save_button.hide()
+ _quit_save_separator.hide()
+
+func show_save_dialog_button() -> void:
+ _main_menu_save_button.show()
+ _main_menu_save_separator.show()
+ _quit_save_button.show()
+ _quit_save_separator.show()
+
# REQUIREMENTS:
# * SS-47
# * UIFUN-69
@@ -21,5 +58,14 @@ func _on_quit_confirmed() -> void:
# * SS-7, SS-46
# * UIFUN-11
func _on_options_button_pressed() -> void:
- hide()
options_button_pressed.emit()
+
+func _on_main_menu_dialog_custom_action(action) -> void:
+ match action:
+ &"save_and_main_menu":
+ _on_main_menu_confirmed()
+
+func _on_quit_dialog_custom_action(action : StringName) -> void:
+ match action:
+ &"save_and_quit":
+ _on_quit_confirmed()
diff --git a/game/src/GameSession/GameSessionMenu.tscn b/game/src/GameSession/GameSessionMenu.tscn
index a753184..99f38df 100644
--- a/game/src/GameSession/GameSessionMenu.tscn
+++ b/game/src/GameSession/GameSessionMenu.tscn
@@ -1,71 +1,89 @@
-[gd_scene load_steps=3 format=3 uid="uid://dvdynl6eir40o"]
+[gd_scene load_steps=4 format=3 uid="uid://dvdynl6eir40o"]
+[ext_resource type="Theme" uid="uid://dndova5cw036e" path="res://theme/game_session_menu.tres" id="1_2onog"]
[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"]
+[node name="GameSessionMenu" type="PanelContainer" node_paths=PackedStringArray("_main_menu_dialog", "_quit_dialog")]
+process_mode = 3
editor_description = "UI-68"
+theme = ExtResource("1_2onog")
+theme_type_variation = &"SessionPanel"
script = ExtResource("1_usq6o")
_main_menu_scene = ExtResource("2_xi6a4")
+_main_menu_dialog = NodePath("MainMenuDialog")
+_quit_dialog = NodePath("QuitDialog")
-[node name="MarginContainer" type="MarginContainer" parent="."]
+[node name="ButtonListMargin" type="MarginContainer" parent="."]
layout_mode = 2
theme_override_constants/margin_left = 10
theme_override_constants/margin_top = 10
theme_override_constants/margin_right = 10
theme_override_constants/margin_bottom = 10
-[node name="VBoxContainer" type="VBoxContainer" parent="MarginContainer"]
+[node name="ButtonList" type="VBoxContainer" parent="ButtonListMargin"]
layout_mode = 2
-[node name="SaveButton" type="Button" parent="MarginContainer/VBoxContainer"]
+[node name="SaveButton" type="Button" parent="ButtonListMargin/ButtonList"]
editor_description = "UI-69"
layout_mode = 2
+theme_type_variation = &"SessionButton"
text = "GAMESESSIONMENU_SAVE"
-[node name="LoadButton" type="Button" parent="MarginContainer/VBoxContainer"]
+[node name="LoadButton" type="Button" parent="ButtonListMargin/ButtonList"]
editor_description = "UI-70"
layout_mode = 2
+theme_type_variation = &"SessionButton"
text = "GAMESESSIONMENU_LOAD"
-[node name="OptionsButton" type="Button" parent="MarginContainer/VBoxContainer"]
+[node name="OptionsButton" type="Button" parent="ButtonListMargin/ButtonList"]
editor_description = "UI-10"
layout_mode = 2
+theme_type_variation = &"SessionButton"
text = "GAMESESSIONMENU_OPTIONS"
-[node name="MainMenuButton" type="Button" parent="MarginContainer/VBoxContainer"]
+[node name="MainMenuButton" type="Button" parent="ButtonListMargin/ButtonList"]
editor_description = "UI-71"
layout_mode = 2
+theme_type_variation = &"SessionButton"
text = "GAMESESSIONMENU_MAINMENU"
-[node name="QuitButton" type="Button" parent="MarginContainer/VBoxContainer"]
+[node name="QuitButton" type="Button" parent="ButtonListMargin/ButtonList"]
editor_description = "UI-72"
layout_mode = 2
+theme_type_variation = &"SessionButton"
text = "GAMESESSIONMENU_QUIT"
-[node name="HSeparator" type="HSeparator" parent="MarginContainer/VBoxContainer"]
+[node name="CloseSeparator" type="HSeparator" parent="ButtonListMargin/ButtonList"]
layout_mode = 2
+theme_type_variation = &"SessionSeparator"
-[node name="CloseButton" type="Button" parent="MarginContainer/VBoxContainer"]
+[node name="CloseButton" type="Button" parent="ButtonListMargin/ButtonList"]
editor_description = "SS-64, UI-80, UIFUN-79"
layout_mode = 2
+theme_type_variation = &"SessionButton"
text = "GAMESESSIONMENU_CLOSE"
[node name="MainMenuDialog" type="ConfirmationDialog" parent="."]
+disable_3d = true
title = "GAMESESSIONMENU_MAINMENU_DIALOG_TITLE"
+size = Vector2i(384, 100)
ok_button_text = "DIALOG_OK"
dialog_text = "GAMESESSIONMENU_MAINMENU_DIALOG_TEXT"
cancel_button_text = "DIALOG_CANCEL"
[node name="QuitDialog" type="ConfirmationDialog" parent="."]
+disable_3d = true
title = "GAMESESSIONMENU_QUIT_DIALOG_TITLE"
ok_button_text = "DIALOG_OK"
dialog_text = "GAMESESSIONMENU_QUIT_DIALOG_TEXT"
cancel_button_text = "DIALOG_CANCEL"
-[connection signal="pressed" from="MarginContainer/VBoxContainer/OptionsButton" to="." method="_on_options_button_pressed"]
-[connection signal="pressed" from="MarginContainer/VBoxContainer/MainMenuButton" to="MainMenuDialog" method="popup_centered"]
-[connection signal="pressed" from="MarginContainer/VBoxContainer/QuitButton" to="QuitDialog" method="popup_centered"]
-[connection signal="pressed" from="MarginContainer/VBoxContainer/CloseButton" to="." method="hide"]
+[connection signal="pressed" from="ButtonListMargin/ButtonList/OptionsButton" to="." method="_on_options_button_pressed"]
+[connection signal="pressed" from="ButtonListMargin/ButtonList/MainMenuButton" to="MainMenuDialog" method="popup_centered"]
+[connection signal="pressed" from="ButtonListMargin/ButtonList/QuitButton" to="QuitDialog" method="popup_centered"]
+[connection signal="pressed" from="ButtonListMargin/ButtonList/CloseButton" to="." method="hide"]
[connection signal="confirmed" from="MainMenuDialog" to="." method="_on_main_menu_confirmed"]
+[connection signal="custom_action" from="MainMenuDialog" to="." method="_on_main_menu_dialog_custom_action"]
[connection signal="confirmed" from="QuitDialog" to="." method="_on_quit_confirmed"]
+[connection signal="custom_action" from="QuitDialog" to="." method="_on_quit_dialog_custom_action"]
diff --git a/game/src/GameSession/GameSpeedPanel.gd b/game/src/GameSession/GameSpeedPanel.gd
index c203032..8b7af29 100644
--- a/game/src/GameSession/GameSpeedPanel.gd
+++ b/game/src/GameSession/GameSpeedPanel.gd
@@ -13,7 +13,7 @@ func _ready():
_update_buttons()
func _update_buttons():
- _play_pause_display_button.text = "⏸️" if GameSingleton.is_paused() else "▶"
+ _play_pause_display_button.text = "⏸ " if GameSingleton.is_paused() else "▶"
_increase_speed_button.disabled = not GameSingleton.can_increase_speed()
_decrease_speed_button.disabled = not GameSingleton.can_decrease_speed()
diff --git a/game/src/GameSession/GameSpeedPanel.tscn b/game/src/GameSession/GameSpeedPanel.tscn
index bfb869c..8a37565 100644
--- a/game/src/GameSession/GameSpeedPanel.tscn
+++ b/game/src/GameSession/GameSpeedPanel.tscn
@@ -4,35 +4,35 @@
[node name="GameSpeedPanel" type="PanelContainer" node_paths=PackedStringArray("_longform_date_button", "_play_pause_display_button", "_decrease_speed_button", "_increase_speed_button")]
script = ExtResource("1_pfs8t")
-_longform_date_button = NodePath("HBoxContainer/LongformDateButton")
-_play_pause_display_button = NodePath("HBoxContainer/PlayPauseDisplayButton")
-_decrease_speed_button = NodePath("HBoxContainer/DecreaseSpeedButton")
-_increase_speed_button = NodePath("HBoxContainer/IncreaseSpeedButton")
+_longform_date_button = NodePath("ButtonList/LongformDateButton")
+_play_pause_display_button = NodePath("ButtonList/PlayPauseDisplayButton")
+_decrease_speed_button = NodePath("ButtonList/DecreaseSpeedButton")
+_increase_speed_button = NodePath("ButtonList/IncreaseSpeedButton")
-[node name="HBoxContainer" type="HBoxContainer" parent="."]
+[node name="ButtonList" type="HBoxContainer" parent="."]
layout_mode = 2
-[node name="LongformDateButton" type="Button" parent="HBoxContainer"]
+[node name="LongformDateButton" type="Button" parent="ButtonList"]
custom_minimum_size = Vector2(200, 0)
layout_mode = 2
text = "LONGFORM DATE"
-[node name="PlayPauseDisplayButton" type="Button" parent="HBoxContainer"]
+[node name="PlayPauseDisplayButton" type="Button" parent="ButtonList"]
custom_minimum_size = Vector2(30, 0)
layout_mode = 2
-text = "⏸"
+text = "⏸ "
-[node name="DecreaseSpeedButton" type="Button" parent="HBoxContainer"]
+[node name="DecreaseSpeedButton" type="Button" parent="ButtonList"]
custom_minimum_size = Vector2(30, 0)
layout_mode = 2
-text = "➖"
+text = "-"
-[node name="IncreaseSpeedButton" type="Button" parent="HBoxContainer"]
+[node name="IncreaseSpeedButton" type="Button" parent="ButtonList"]
custom_minimum_size = Vector2(30, 0)
layout_mode = 2
-text = "➕"
+text = "+"
-[connection signal="pressed" from="HBoxContainer/LongformDateButton" to="." method="_on_longform_date_label_pressed"]
-[connection signal="pressed" from="HBoxContainer/PlayPauseDisplayButton" to="." method="_on_play_pause_display_button_pressed"]
-[connection signal="pressed" from="HBoxContainer/DecreaseSpeedButton" to="." method="_on_decrease_speed_button_pressed"]
-[connection signal="pressed" from="HBoxContainer/IncreaseSpeedButton" to="." method="_on_increase_speed_button_pressed"]
+[connection signal="pressed" from="ButtonList/LongformDateButton" to="." method="_on_longform_date_label_pressed"]
+[connection signal="pressed" from="ButtonList/PlayPauseDisplayButton" to="." method="_on_play_pause_display_button_pressed"]
+[connection signal="pressed" from="ButtonList/DecreaseSpeedButton" to="." method="_on_decrease_speed_button_pressed"]
+[connection signal="pressed" from="ButtonList/IncreaseSpeedButton" to="." method="_on_increase_speed_button_pressed"]
diff --git a/game/src/GameSession/MapControlPanel.tscn b/game/src/GameSession/MapControlPanel.tscn
index 27205e3..18b1c3f 100644
--- a/game/src/GameSession/MapControlPanel.tscn
+++ b/game/src/GameSession/MapControlPanel.tscn
@@ -15,89 +15,96 @@ events = [SubResource("InputEventAction_5nck3")]
editor_description = "SS-103"
mouse_filter = 1
script = ExtResource("1_ign64")
-_mapmodes_grid = NodePath("MarginContainer/HBoxContainer/VBoxContainer/MapmodesGrid")
+_mapmodes_grid = NodePath("MapPanelMargin/MapPanelList/MapDisplayList/MapmodesGrid")
-[node name="MarginContainer" type="MarginContainer" parent="."]
+[node name="MapPanelMargin" type="MarginContainer" parent="."]
layout_mode = 2
theme_override_constants/margin_left = 5
theme_override_constants/margin_top = 5
theme_override_constants/margin_right = 5
theme_override_constants/margin_bottom = 5
-[node name="HBoxContainer" type="HBoxContainer" parent="MarginContainer"]
+[node name="MapPanelList" type="HBoxContainer" parent="MapPanelMargin"]
layout_mode = 2
theme_override_constants/separation = 6
alignment = 1
-[node name="VBoxContainer" type="VBoxContainer" parent="MarginContainer/HBoxContainer"]
+[node name="MapDisplayList" type="VBoxContainer" parent="MapPanelMargin/MapPanelList"]
layout_mode = 2
alignment = 1
-[node name="MapmodesGrid" type="GridContainer" parent="MarginContainer/HBoxContainer/VBoxContainer"]
+[node name="MapmodesGrid" type="GridContainer" parent="MapPanelMargin/MapPanelList/MapDisplayList"]
editor_description = "UI-750"
layout_mode = 2
columns = 11
-[node name="Minimap" type="PanelContainer" parent="MarginContainer/HBoxContainer/VBoxContainer"]
+[node name="Minimap" type="PanelContainer" parent="MapPanelMargin/MapPanelList/MapDisplayList"]
editor_description = "UI-549"
layout_mode = 2
mouse_filter = 1
-[node name="TextureRect" type="TextureRect" parent="MarginContainer/HBoxContainer/VBoxContainer/Minimap"]
+[node name="MinimapTexture" type="TextureRect" parent="MapPanelMargin/MapPanelList/MapDisplayList/Minimap"]
editor_description = "UI-751, FS-338"
layout_mode = 2
texture = ExtResource("2_r613r")
-[node name="ViewportQuad" type="Control" parent="MarginContainer/HBoxContainer/VBoxContainer/Minimap"]
+[node name="ViewportQuad" type="Control" parent="MapPanelMargin/MapPanelList/MapDisplayList/Minimap"]
layout_mode = 2
mouse_filter = 2
script = ExtResource("3_s4dml")
-[node name="Frame" type="NinePatchRect" parent="MarginContainer/HBoxContainer/VBoxContainer/Minimap"]
+[node name="Frame" type="NinePatchRect" parent="MapPanelMargin/MapPanelList/MapDisplayList/Minimap"]
layout_mode = 2
texture = ExtResource("4_f1exl")
-
-[node name="AuxiliaryPanel" type="VBoxContainer" parent="MarginContainer/HBoxContainer"]
+draw_center = false
+patch_margin_left = 10
+patch_margin_top = 10
+patch_margin_right = 10
+patch_margin_bottom = 10
+axis_stretch_horizontal = 1
+axis_stretch_vertical = 1
+
+[node name="AuxiliaryPanel" type="VBoxContainer" parent="MapPanelMargin/MapPanelList"]
editor_description = "UI-761"
layout_mode = 2
-[node name="GameSessionMenuButton" type="Button" parent="MarginContainer/HBoxContainer/AuxiliaryPanel"]
+[node name="GameSessionMenuButton" type="Button" parent="MapPanelMargin/MapPanelList/AuxiliaryPanel"]
editor_description = "UI-9"
layout_mode = 2
mouse_filter = 1
shortcut = SubResource("Shortcut_fc1tk")
text = "ESC"
-[node name="LedgerButton" type="Button" parent="MarginContainer/HBoxContainer/AuxiliaryPanel"]
+[node name="LedgerButton" type="Button" parent="MapPanelMargin/MapPanelList/AuxiliaryPanel"]
editor_description = "UI-860"
layout_mode = 2
mouse_filter = 1
text = "L"
-[node name="FindButton" type="Button" parent="MarginContainer/HBoxContainer/AuxiliaryPanel"]
+[node name="FindButton" type="Button" parent="MapPanelMargin/MapPanelList/AuxiliaryPanel"]
editor_description = "UI-861"
layout_mode = 2
mouse_filter = 1
text = "F"
-[node name="ZoomButtonsContainer" type="HBoxContainer" parent="MarginContainer/HBoxContainer/AuxiliaryPanel"]
+[node name="ZoomButtonsContainer" type="HBoxContainer" parent="MapPanelMargin/MapPanelList/AuxiliaryPanel"]
layout_mode = 2
alignment = 1
-[node name="ZoomInButton" type="Button" parent="MarginContainer/HBoxContainer/AuxiliaryPanel/ZoomButtonsContainer"]
+[node name="ZoomInButton" type="Button" parent="MapPanelMargin/MapPanelList/AuxiliaryPanel/ZoomButtonsContainer"]
editor_description = "UI-862"
layout_mode = 2
mouse_filter = 1
text = "+"
-[node name="ZoomOutButton" type="Button" parent="MarginContainer/HBoxContainer/AuxiliaryPanel/ZoomButtonsContainer"]
+[node name="ZoomOutButton" type="Button" parent="MapPanelMargin/MapPanelList/AuxiliaryPanel/ZoomButtonsContainer"]
editor_description = "UI-863"
layout_mode = 2
mouse_filter = 1
text = "-"
-[connection signal="map_view_camera_changed" from="." to="MarginContainer/HBoxContainer/VBoxContainer/Minimap/ViewportQuad" method="_on_map_view_camera_changed"]
-[connection signal="minimap_clicked" from="MarginContainer/HBoxContainer/VBoxContainer/Minimap/ViewportQuad" to="." method="_on_minimap_clicked"]
-[connection signal="pressed" from="MarginContainer/HBoxContainer/AuxiliaryPanel/GameSessionMenuButton" to="." method="_on_game_session_menu_button_pressed"]
-[connection signal="pressed" from="MarginContainer/HBoxContainer/AuxiliaryPanel/ZoomButtonsContainer/ZoomInButton" to="." method="_on_zoom_in_button_pressed"]
-[connection signal="pressed" from="MarginContainer/HBoxContainer/AuxiliaryPanel/ZoomButtonsContainer/ZoomOutButton" to="." method="_on_zoom_out_button_pressed"]
+[connection signal="map_view_camera_changed" from="." to="MapPanelMargin/MapPanelList/MapDisplayList/Minimap/ViewportQuad" method="_on_map_view_camera_changed"]
+[connection signal="minimap_clicked" from="MapPanelMargin/MapPanelList/MapDisplayList/Minimap/ViewportQuad" to="." method="_on_minimap_clicked"]
+[connection signal="pressed" from="MapPanelMargin/MapPanelList/AuxiliaryPanel/GameSessionMenuButton" to="." method="_on_game_session_menu_button_pressed"]
+[connection signal="pressed" from="MapPanelMargin/MapPanelList/AuxiliaryPanel/ZoomButtonsContainer/ZoomInButton" to="." method="_on_zoom_in_button_pressed"]
+[connection signal="pressed" from="MapPanelMargin/MapPanelList/AuxiliaryPanel/ZoomButtonsContainer/ZoomOutButton" to="." method="_on_zoom_out_button_pressed"]
diff --git a/game/src/GameSession/MapView.gd b/game/src/GameSession/MapView.gd
index ac060e1..510d70a 100644
--- a/game/src/GameSession/MapView.gd
+++ b/game/src/GameSession/MapView.gd
@@ -7,8 +7,8 @@ const _action_north : StringName = &"map_north"
const _action_east : StringName = &"map_east"
const _action_south : StringName = &"map_south"
const _action_west : StringName = &"map_west"
-const _action_zoomin : StringName = &"map_zoomin"
-const _action_zoomout : StringName = &"map_zoomout"
+const _action_zoom_in : StringName = &"map_zoom_in"
+const _action_zoom_out : StringName = &"map_zoom_out"
const _action_drag : StringName = &"map_drag"
const _action_click : StringName = &"map_click"
@@ -165,9 +165,9 @@ func _unhandled_input(event : InputEvent):
if not _drag_active:
push_warning("Drag being deactivated while already not active!")
_drag_active = false
- elif event.is_action_pressed(_action_zoomin, true):
+ elif event.is_action_pressed(_action_zoom_in, true):
zoom_in()
- elif event.is_action_pressed(_action_zoomout, true):
+ elif event.is_action_pressed(_action_zoom_out, true):
zoom_out()
func _physics_process(delta : float):
diff --git a/game/src/GameSession/ProvinceOverviewPanel.gd b/game/src/GameSession/ProvinceOverviewPanel.gd
index 832f21c..cbab9d0 100644
--- a/game/src/GameSession/ProvinceOverviewPanel.gd
+++ b/game/src/GameSession/ProvinceOverviewPanel.gd
@@ -1,4 +1,4 @@
-extends Panel
+extends PanelContainer
@export var _province_name_label : Label
@export var _region_name_label : Label
diff --git a/game/src/GameSession/ProvinceOverviewPanel.tscn b/game/src/GameSession/ProvinceOverviewPanel.tscn
index dacdc4b..7b28cc1 100644
--- a/game/src/GameSession/ProvinceOverviewPanel.tscn
+++ b/game/src/GameSession/ProvinceOverviewPanel.tscn
@@ -2,7 +2,7 @@
[ext_resource type="Script" path="res://src/GameSession/ProvinceOverviewPanel.gd" id="1_3n8k5"]
-[node name="ProvinceOverviewPanel" type="Panel" node_paths=PackedStringArray("_province_name_label", "_region_name_label", "_buildings_container")]
+[node name="ProvinceOverviewPanel" type="PanelContainer" node_paths=PackedStringArray("_province_name_label", "_region_name_label", "_buildings_container")]
editor_description = "UI-56"
anchors_preset = 2
anchor_top = 1.0
@@ -11,47 +11,48 @@ offset_top = -300.0
offset_right = 200.0
grow_vertical = 0
script = ExtResource("1_3n8k5")
-_province_name_label = NodePath("VBoxContainer/ProvinceName")
-_region_name_label = NodePath("VBoxContainer/RegionName")
-_buildings_container = NodePath("VBoxContainer/BuildingsContainer")
-
-[node name="VBoxContainer" type="VBoxContainer" parent="."]
-layout_mode = 1
-anchors_preset = -1
-anchor_right = 1.0
-anchor_bottom = 1.0
-offset_left = 10.0
-offset_top = 5.0
-offset_right = -10.0
-offset_bottom = -5.0
+_province_name_label = NodePath("PanelList/TopBarList/NameList/ProvinceName")
+_region_name_label = NodePath("PanelList/TopBarList/NameList/RegionName")
+_buildings_container = NodePath("PanelList/InteractList/BuildingsContainer")
+
+[node name="PanelList" type="VBoxContainer" parent="."]
+layout_mode = 2
+
+[node name="TopBarList" type="HBoxContainer" parent="PanelList"]
+layout_mode = 2
+
+[node name="NameList" type="VBoxContainer" parent="PanelList/TopBarList"]
+layout_mode = 2
+size_flags_horizontal = 3
+size_flags_vertical = 0
-[node name="ProvinceName" type="Label" parent="VBoxContainer"]
+[node name="ProvinceName" type="Label" parent="PanelList/TopBarList/NameList"]
editor_description = "UI-57"
layout_mode = 2
text = "province_MISSING"
vertical_alignment = 1
-[node name="RegionName" type="Label" parent="VBoxContainer"]
+[node name="RegionName" type="Label" parent="PanelList/TopBarList/NameList"]
editor_description = "UI-58"
layout_mode = 2
text = "region_MISSING"
vertical_alignment = 1
-[node name="HSeparator" type="HSeparator" parent="VBoxContainer"]
+[node name="CloseButton" type="Button" parent="PanelList/TopBarList"]
+custom_minimum_size = Vector2(30, 30)
+layout_mode = 2
+size_flags_vertical = 0
+text = "X"
+
+[node name="InteractList" type="VBoxContainer" parent="PanelList"]
layout_mode = 2
+size_flags_vertical = 3
-[node name="BuildingsContainer" type="GridContainer" parent="VBoxContainer"]
+[node name="HSeparator" type="HSeparator" parent="PanelList/InteractList"]
layout_mode = 2
-columns = 3
-[node name="CloseButton" type="Button" parent="."]
-custom_minimum_size = Vector2(30, 30)
-layout_mode = 1
-anchors_preset = -1
-anchor_left = 0.85
-anchor_right = 1.0
-anchor_bottom = 0.103333
-grow_horizontal = 0
-text = "X"
+[node name="BuildingsContainer" type="GridContainer" parent="PanelList/InteractList"]
+layout_mode = 2
+columns = 3
-[connection signal="pressed" from="CloseButton" to="." method="_on_close_button_pressed"]
+[connection signal="pressed" from="PanelList/TopBarList/CloseButton" to="." method="_on_close_button_pressed"]