aboutsummaryrefslogtreecommitdiff
path: root/game/src/GameSession/MapControlPanel.tscn
diff options
context:
space:
mode:
author George L. Albany <Megacake1234@gmail.com>2023-04-14 18:31:58 +0200
committer GitHub <noreply@github.com>2023-04-14 18:31:58 +0200
commit436b038c1806e326ff6458f1692e9009d3a54346 (patch)
treeb5a33a733398b511eb0aa7781860c8accbadd2a0 /game/src/GameSession/MapControlPanel.tscn
parent1f04a7827ae377372cb491ff0257a47d0d4c2967 (diff)
parent7241811bd8c9493b7b6c6480e8d63a5fb7f38e4e (diff)
Merge pull request #84 from OpenVic2Project/terrain-map
Diffstat (limited to 'game/src/GameSession/MapControlPanel.tscn')
-rw-r--r--game/src/GameSession/MapControlPanel.tscn43
1 files changed, 37 insertions, 6 deletions
diff --git a/game/src/GameSession/MapControlPanel.tscn b/game/src/GameSession/MapControlPanel.tscn
index 71d43e7..70d7eab 100644
--- a/game/src/GameSession/MapControlPanel.tscn
+++ b/game/src/GameSession/MapControlPanel.tscn
@@ -1,24 +1,52 @@
-[gd_scene load_steps=2 format=3 uid="uid://g524p8lr574w"]
+[gd_scene load_steps=7 format=3 uid="uid://g524p8lr574w"]
[ext_resource type="Script" path="res://src/GameSession/MapControlPanel.gd" id="1_ign64"]
+[ext_resource type="Texture2D" uid="uid://c0sm1jfu4kyv3" path="res://art/ui/minimap.png" id="2_r613r"]
+[ext_resource type="Script" path="res://src/GameSession/Minimap.gd" id="3_s4dml"]
+[ext_resource type="Texture2D" uid="uid://vr1hq2stk8ny" path="res://art/ui/minimap_frame.png" id="4_f1exl"]
-[node name="PanelContainer" type="PanelContainer"]
+[sub_resource type="InputEventAction" id="InputEventAction_5nck3"]
+action = &"ui_cancel"
+
+[sub_resource type="Shortcut" id="Shortcut_fc1tk"]
+events = [SubResource("InputEventAction_5nck3")]
+
+[node name="MapControlPanel" type="PanelContainer" node_paths=PackedStringArray("_mapmodes_grid")]
editor_description = "SS-103"
+mouse_filter = 1
script = ExtResource("1_ign64")
+_mapmodes_grid = NodePath("HBoxContainer/VBoxContainer/MapmodesGrid")
[node name="HBoxContainer" type="HBoxContainer" parent="."]
layout_mode = 2
+alignment = 2
[node name="VBoxContainer" type="VBoxContainer" parent="HBoxContainer"]
layout_mode = 2
-[node name="MapmodesPlaceholder" type="Label" parent="HBoxContainer/VBoxContainer"]
+[node name="MapmodesGrid" type="GridContainer" parent="HBoxContainer/VBoxContainer"]
+editor_description = "UI-750"
+layout_mode = 2
+columns = 11
+
+[node name="Minimap" type="PanelContainer" parent="HBoxContainer/VBoxContainer"]
+editor_description = "UI-549"
+layout_mode = 2
+mouse_filter = 1
+
+[node name="TextureRect" type="TextureRect" parent="HBoxContainer/VBoxContainer/Minimap"]
+editor_description = "UI-751, FS-338"
+layout_mode = 2
+texture = ExtResource("2_r613r")
+
+[node name="ViewportQuad" type="Control" parent="HBoxContainer/VBoxContainer/Minimap"]
layout_mode = 2
-text = "MAPMODES"
+mouse_filter = 2
+script = ExtResource("3_s4dml")
-[node name="MinimapPlaceholder" type="Label" parent="HBoxContainer/VBoxContainer"]
+[node name="Frame" type="NinePatchRect" parent="HBoxContainer/VBoxContainer/Minimap"]
layout_mode = 2
-text = "MINIMAP"
+texture = ExtResource("4_f1exl")
[node name="AuxiliaryPanel" type="VBoxContainer" parent="HBoxContainer"]
editor_description = "UI-761"
@@ -27,6 +55,9 @@ layout_mode = 2
[node name="GameSessionMenuButton" type="Button" parent="HBoxContainer/AuxiliaryPanel"]
editor_description = "UI-9"
layout_mode = 2
+shortcut = SubResource("Shortcut_fc1tk")
text = "ESC"
+[connection signal="map_view_camera_changed" from="." to="HBoxContainer/VBoxContainer/Minimap/ViewportQuad" method="_on_map_view_camera_changed"]
+[connection signal="minimap_clicked" from="HBoxContainer/VBoxContainer/Minimap/ViewportQuad" to="." method="_on_minimap_clicked"]
[connection signal="pressed" from="HBoxContainer/AuxiliaryPanel/GameSessionMenuButton" to="." method="_on_game_session_menu_button_pressed"]