aboutsummaryrefslogtreecommitdiff
path: root/game/src/GameSession/GameSession.tscn
diff options
context:
space:
mode:
author Gone2Daly <71726742+Gone2Daly@users.noreply.github.com>2023-04-09 21:51:15 +0200
committer Gone2Daly <71726742+Gone2Daly@users.noreply.github.com>2023-04-09 21:51:15 +0200
commit9c74c5d67569c7ca6c08a2f0ef5a27272332f31d (patch)
tree97aa346ff22742d5b3be668d9f804ca7a3fb36c1 /game/src/GameSession/GameSession.tscn
parenta44253be41840ca3236dbfa5f2a46a9dd7a8d300 (diff)
Minimap functionality
Adding minimap click, cutting minimap camera edges, adding check for mouse of the window to stop parallax, also adding lock for parallax when mouse on minimap.
Diffstat (limited to 'game/src/GameSession/GameSession.tscn')
-rw-r--r--game/src/GameSession/GameSession.tscn50
1 files changed, 6 insertions, 44 deletions
diff --git a/game/src/GameSession/GameSession.tscn b/game/src/GameSession/GameSession.tscn
index dc3ab75..76a5fcc 100644
--- a/game/src/GameSession/GameSession.tscn
+++ b/game/src/GameSession/GameSession.tscn
@@ -1,13 +1,10 @@
-[gd_scene load_steps=9 format=3 uid="uid://bgnupcshe1m7r"]
+[gd_scene load_steps=6 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"]
[ext_resource type="PackedScene" uid="uid://dkehmdnuxih2r" path="res://src/GameSession/MapView.tscn" id="4_xkg5j"]
-[ext_resource type="Texture2D" uid="uid://c0sm1jfu4kyv3" path="res://art/ui/minimap.png" id="5_l05wo"]
[ext_resource type="PackedScene" uid="uid://byq323jbel48u" path="res://src/GameSession/ProvinceOverviewPanel.tscn" id="5_osjnn"]
-[ext_resource type="Texture2D" uid="uid://vr1hq2stk8ny" path="res://art/ui/minimap_frame.png" id="6_ujbv2"]
-[ext_resource type="Script" path="res://src/GameSession/Minimap.gd" id="7_go8y3"]
[node name="GameSession" type="Node" node_paths=PackedStringArray("_game_session_menu")]
editor_description = "SS-102"
@@ -27,54 +24,16 @@ grow_horizontal = 2
grow_vertical = 2
[node name="MapControlPanel" parent="." instance=ExtResource("3_afh6d")]
-offset_left = 1147.0
-offset_top = 486.0
-offset_right = 1280.0
-offset_bottom = 542.0
-grow_horizontal = 0
-grow_vertical = 0
-
-[node name="Minimap" type="Control" parent="."]
-layout_mode = 3
anchors_preset = 3
anchor_left = 1.0
anchor_top = 1.0
anchor_right = 1.0
anchor_bottom = 1.0
offset_left = -350.0
-offset_top = -175.0
+offset_top = -210.0
grow_horizontal = 0
grow_vertical = 0
-[node name="TextureRect" type="TextureRect" parent="Minimap"]
-layout_mode = 0
-offset_right = 350.0
-offset_bottom = 175.0
-texture = ExtResource("5_l05wo")
-
-[node name="RectangularCamera" type="Control" parent="Minimap" node_paths=PackedStringArray("_background")]
-anchors_preset = 0
-offset_right = 40.0
-offset_bottom = 40.0
-mouse_filter = 2
-script = ExtResource("7_go8y3")
-_background = NodePath("../TextureRect")
-
-[node name="Frame" type="NinePatchRect" parent="Minimap"]
-layout_mode = 1
-anchors_preset = 8
-anchor_left = 0.5
-anchor_top = 0.5
-anchor_right = 0.5
-anchor_bottom = 0.5
-offset_left = -175.0
-offset_top = -87.5
-offset_right = 175.0
-offset_bottom = 87.5
-grow_horizontal = 2
-grow_vertical = 2
-texture = ExtResource("6_ujbv2")
-
[node name="ProvinceOverviewPanel" parent="." instance=ExtResource("5_osjnn")]
anchors_preset = -1
anchor_top = 0.583333
@@ -82,8 +41,11 @@ anchor_right = 0.15625
offset_top = 0.0
offset_right = 0.0
-[connection signal="map_view_camera_changed" from="MapView" to="Minimap/RectangularCamera" method="_on_camera_view_changed"]
+[connection signal="map_view_camera_changed" from="MapView" to="MapControlPanel" method="_on_map_view_map_view_camera_changed"]
[connection signal="province_selected" from="MapView" to="ProvinceOverviewPanel" method="_on_province_selected"]
[connection signal="close_button_pressed" from="GameSessionMenu" to="." method="_on_game_session_menu_close_button_pressed"]
+[connection signal="camera_change" from="MapControlPanel" to="MapView" method="_on_map_control_panel_camera_change"]
[connection signal="game_session_menu_button_pressed" from="MapControlPanel" to="." method="_on_game_session_menu_button_pressed"]
[connection signal="mapmode_changed" from="MapControlPanel" to="MapView" method="_update_colour_texture"]
+[connection signal="mouse_entered" from="MapControlPanel" to="MapView" method="_on_map_control_panel_mouse_entered"]
+[connection signal="mouse_exited" from="MapControlPanel" to="MapView" method="_on_map_control_panel_mouse_exited"]