diff options
author | George L. Albany <Megacake1234@gmail.com> | 2024-05-07 01:15:50 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-07 01:15:50 +0200 |
commit | c29cc0dabe3e3c7d03280e74d2d10fc3cc479c7f (patch) | |
tree | 059fe3b320d6ed41416aee3853c5eb8e8ca36583 /game/src/Game/GameSession/GameSession.tscn | |
parent | 8c8ee1524f51d44acd1d1894eda5984956cba9a6 (diff) | |
parent | 7def4dd2e7987c20163c6a419bcc0506b5a670d9 (diff) |
Merge pull request #226 from Spartan322/click-mask-guinodes
Improve map view and game panel user experience
Diffstat (limited to 'game/src/Game/GameSession/GameSession.tscn')
-rw-r--r-- | game/src/Game/GameSession/GameSession.tscn | 70 |
1 files changed, 41 insertions, 29 deletions
diff --git a/game/src/Game/GameSession/GameSession.tscn b/game/src/Game/GameSession/GameSession.tscn index d2fc3a3..343ddfe 100644 --- a/game/src/Game/GameSession/GameSession.tscn +++ b/game/src/Game/GameSession/GameSession.tscn @@ -28,63 +28,76 @@ grow_horizontal = 2 grow_vertical = 2 mouse_filter = 2 script = ExtResource("1_eklvp") -_game_session_menu = NodePath("GameSessionMenu") +_game_session_menu = NodePath("UICanvasLayer/UI/GameSessionMenu") [node name="MapView" parent="." instance=ExtResource("4_xkg5j")] -[node name="ProvinceOverviewPanel" type="GUINode" parent="."] +[node name="UICanvasLayer" type="CanvasLayer" parent="."] + +[node name="UI" type="Control" parent="UICanvasLayer"] +layout_mode = 3 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +mouse_filter = 2 + +[node name="ProvinceOverviewPanel" type="GUINode" parent="UICanvasLayer/UI"] layout_mode = 1 anchors_preset = 15 +mouse_force_pass_scroll_events = false script = ExtResource("5_lfv8l") -[node name="Topbar" type="GUINode" parent="."] +[node name="Topbar" type="GUINode" parent="UICanvasLayer/UI"] layout_mode = 1 anchors_preset = 15 +mouse_force_pass_scroll_events = false script = ExtResource("4_2kbih") -[node name="ProductionMenu" type="GUINode" parent="Topbar"] +[node name="ProductionMenu" type="GUINode" parent="UICanvasLayer/UI/Topbar"] layout_mode = 1 anchors_preset = 15 script = ExtResource("5_16755") -[node name="BudgetMenu" type="GUINode" parent="Topbar"] +[node name="BudgetMenu" type="GUINode" parent="UICanvasLayer/UI/Topbar"] layout_mode = 1 anchors_preset = 15 script = ExtResource("6_vninv") -[node name="TechnologyMenu" type="GUINode" parent="Topbar"] +[node name="TechnologyMenu" type="GUINode" parent="UICanvasLayer/UI/Topbar"] layout_mode = 1 anchors_preset = 15 script = ExtResource("7_r712c") -[node name="PoliticsMenu" type="GUINode" parent="Topbar"] +[node name="PoliticsMenu" type="GUINode" parent="UICanvasLayer/UI/Topbar"] layout_mode = 1 anchors_preset = 15 script = ExtResource("8_ppdek") -[node name="PopulationMenu" type="GUINode" parent="Topbar"] +[node name="PopulationMenu" type="GUINode" parent="UICanvasLayer/UI/Topbar"] layout_mode = 1 anchors_preset = 15 script = ExtResource("10_laee7") -[node name="TradeMenu" type="GUINode" parent="Topbar"] +[node name="TradeMenu" type="GUINode" parent="UICanvasLayer/UI/Topbar"] layout_mode = 1 anchors_preset = 15 script = ExtResource("10_mv1r6") -[node name="DiplomacyMenu" type="GUINode" parent="Topbar"] +[node name="DiplomacyMenu" type="GUINode" parent="UICanvasLayer/UI/Topbar"] layout_mode = 1 anchors_preset = 15 script = ExtResource("11_fu7ys") -[node name="MilitaryMenu" type="GUINode" parent="Topbar"] +[node name="MilitaryMenu" type="GUINode" parent="UICanvasLayer/UI/Topbar"] layout_mode = 1 anchors_preset = 15 script = ExtResource("12_6h6nc") -[node name="MapControlPanel" parent="." instance=ExtResource("3_afh6d")] +[node name="MapControlPanel" parent="UICanvasLayer/UI" instance=ExtResource("3_afh6d")] layout_mode = 1 -anchors_preset = 3 +anchors_preset = -1 anchor_left = 1.0 anchor_top = 1.0 anchor_right = 1.0 @@ -92,7 +105,7 @@ anchor_bottom = 1.0 grow_horizontal = 0 grow_vertical = 0 -[node name="GameSessionMenu" parent="." instance=ExtResource("3_bvmqh")] +[node name="GameSessionMenu" parent="UICanvasLayer/UI" instance=ExtResource("3_bvmqh")] visible = false layout_mode = 1 anchors_preset = 8 @@ -107,11 +120,12 @@ offset_bottom = 165.0 grow_horizontal = 2 grow_vertical = 2 -[node name="OptionsMenu" parent="." instance=ExtResource("6_p5mnx")] +[node name="OptionsMenu" parent="UICanvasLayer/UI" instance=ExtResource("6_p5mnx")] visible = false layout_mode = 1 +mouse_force_pass_scroll_events = false -[node name="SaveLoadMenu" parent="." instance=ExtResource("8_4g7ko")] +[node name="SaveLoadMenu" parent="UICanvasLayer/UI" instance=ExtResource("8_4g7ko")] visible = false layout_mode = 1 anchors_preset = -1 @@ -120,7 +134,7 @@ anchor_right = 0.5 offset_left = -640.0 offset_right = 640.0 -[node name="MusicPlayer" parent="." instance=ExtResource("2_kt6aa")] +[node name="MusicPlayer" parent="UICanvasLayer/UI" instance=ExtResource("2_kt6aa")] layout_mode = 1 anchors_preset = 1 anchor_left = 1.0 @@ -129,15 +143,13 @@ 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="game_session_menu_button_pressed" from="MapControlPanel" to="." method="_on_game_session_menu_button_pressed"] -[connection signal="minimap_clicked" from="MapControlPanel" to="MapView" method="_on_minimap_clicked"] -[connection signal="mouse_entered" from="MapControlPanel" to="MapView" method="_on_mouse_exited_viewport"] -[connection signal="mouse_exited" from="MapControlPanel" to="MapView" method="_on_mouse_entered_viewport"] -[connection signal="zoom_in_button_pressed" from="MapControlPanel" to="MapView" method="zoom_in"] -[connection signal="zoom_out_button_pressed" from="MapControlPanel" to="MapView" method="zoom_out"] -[connection signal="load_button_pressed" from="GameSessionMenu" to="SaveLoadMenu" method="show_for_load"] -[connection signal="options_button_pressed" from="GameSessionMenu" to="OptionsMenu" method="show"] -[connection signal="save_button_pressed" from="GameSessionMenu" to="SaveLoadMenu" method="show_for_save"] -[connection signal="back_button_pressed" from="OptionsMenu" to="MapView" method="enable_processing"] -[connection signal="back_button_pressed" from="OptionsMenu" to="OptionsMenu" method="hide"] +[connection signal="map_view_camera_changed" from="MapView" to="UICanvasLayer/UI/MapControlPanel" method="_on_map_view_camera_changed"] +[connection signal="game_session_menu_button_pressed" from="UICanvasLayer/UI/MapControlPanel" to="." method="_on_game_session_menu_button_pressed"] +[connection signal="minimap_clicked" from="UICanvasLayer/UI/MapControlPanel" to="MapView" method="_on_minimap_clicked"] +[connection signal="zoom_in_button_pressed" from="UICanvasLayer/UI/MapControlPanel" to="MapView" method="zoom_in"] +[connection signal="zoom_out_button_pressed" from="UICanvasLayer/UI/MapControlPanel" to="MapView" method="zoom_out"] +[connection signal="load_button_pressed" from="UICanvasLayer/UI/GameSessionMenu" to="UICanvasLayer/UI/SaveLoadMenu" method="show_for_load"] +[connection signal="options_button_pressed" from="UICanvasLayer/UI/GameSessionMenu" to="UICanvasLayer/UI/OptionsMenu" method="show"] +[connection signal="save_button_pressed" from="UICanvasLayer/UI/GameSessionMenu" to="UICanvasLayer/UI/SaveLoadMenu" method="show_for_save"] +[connection signal="back_button_pressed" from="UICanvasLayer/UI/OptionsMenu" to="MapView" method="enable_processing"] +[connection signal="back_button_pressed" from="UICanvasLayer/UI/OptionsMenu" to="UICanvasLayer/UI/OptionsMenu" method="hide"] |