From bec1acf3f87d70d5de0f3be929b700fdcf064a13 Mon Sep 17 00:00:00 2001 From: Feufochmar Date: Sun, 19 Dec 2021 18:13:34 +0100 Subject: [PATCH] Change the screens so that the disposition of HUD elements is better in fullscreen. --- screen/end_screen.tscn | 9 ++++--- screen/exploration_screen.tscn | 45 +++++++++++++++++++++------------- screen/map_screen.tscn | 19 +++++++++----- 3 files changed, 46 insertions(+), 27 deletions(-) diff --git a/screen/end_screen.tscn b/screen/end_screen.tscn index 2dd1cd4..fb86eae 100644 --- a/screen/end_screen.tscn +++ b/screen/end_screen.tscn @@ -12,16 +12,17 @@ font_data = ExtResource( 3 ) script = ExtResource( 1 ) [node name="ColorRect" type="ColorRect" parent="."] -margin_right = 1024.0 -margin_bottom = 600.0 +anchor_right = 1.0 +anchor_bottom = 1.0 color = Color( 0.211765, 0.294118, 0.231373, 1 ) __meta__ = { "_edit_use_anchors_": false } [node name="MapViewer" parent="." instance=ExtResource( 2 )] -margin_left = 424.0 -margin_right = 1024.0 +anchor_left = 1.0 +anchor_right = 1.0 +margin_left = -600.0 margin_bottom = 600.0 show_unvisited = true diff --git a/screen/exploration_screen.tscn b/screen/exploration_screen.tscn index 7da5250..3904b21 100644 --- a/screen/exploration_screen.tscn +++ b/screen/exploration_screen.tscn @@ -39,10 +39,12 @@ transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 5, 0, 3 ) [node name="HUD" type="Node" parent="."] [node name="NbSteps" type="Label" parent="HUD"] +anchor_top = 1.0 +anchor_bottom = 1.0 margin_left = 16.0 -margin_top = 528.0 -margin_right = 97.0 -margin_bottom = 551.0 +margin_top = -72.0 +margin_right = 99.0 +margin_bottom = -44.0 custom_fonts/font = SubResource( 1 ) text = "NbSteps" __meta__ = { @@ -50,28 +52,37 @@ __meta__ = { } [node name="NbChests" type="Label" parent="HUD"] +anchor_top = 1.0 +anchor_bottom = 1.0 margin_left = 16.0 -margin_top = 560.0 -margin_right = 97.0 -margin_bottom = 583.0 +margin_top = -40.0 +margin_right = 113.0 +margin_bottom = -12.0 custom_fonts/font = SubResource( 2 ) text = "NbChests" __meta__ = { "_edit_use_anchors_": false } -[node name="Help" type="Node" parent="HUD"] +[node name="Help" type="Control" parent="HUD"] +anchor_left = 1.0 +anchor_top = 1.0 +anchor_right = 1.0 +anchor_bottom = 1.0 +__meta__ = { +"_edit_use_anchors_": false +} [node name="Button-Stop" type="Sprite" parent="HUD/Help"] -position = Vector2( 855.5, 568 ) +position = Vector2( -168.5, -48 ) scale = Vector2( 0.5, 0.5 ) texture = ExtResource( 7 ) [node name="Stop" type="Label" parent="HUD/Help"] -margin_left = 887.5 -margin_top = 552.0 -margin_right = 1009.5 -margin_bottom = 580.0 +margin_left = -136.5 +margin_top = -64.0 +margin_right = -14.5 +margin_bottom = -36.0 custom_fonts/font = SubResource( 2 ) text = "Leave Game" __meta__ = { @@ -79,15 +90,15 @@ __meta__ = { } [node name="Button-Map" type="Sprite" parent="HUD/Help"] -position = Vector2( 856, 503.5 ) +position = Vector2( -168, -112.5 ) scale = Vector2( 0.5, 0.5 ) texture = ExtResource( 8 ) [node name="Map" type="Label" parent="HUD/Help"] -margin_left = 888.0 -margin_top = 487.5 -margin_right = 1010.0 -margin_bottom = 515.5 +margin_left = -136.0 +margin_top = -128.5 +margin_right = -14.0 +margin_bottom = -100.5 custom_fonts/font = SubResource( 2 ) text = "Show Map" __meta__ = { diff --git a/screen/map_screen.tscn b/screen/map_screen.tscn index 721aba5..53478ed 100644 --- a/screen/map_screen.tscn +++ b/screen/map_screen.tscn @@ -8,23 +8,30 @@ size = 24 font_data = ExtResource( 3 ) -[node name="MapScreen" type="Node2D"] +[node name="MapScreen" type="Node"] script = ExtResource( 1 ) [node name="ColorRect" type="ColorRect" parent="."] -margin_right = 1024.0 -margin_bottom = 600.0 +anchor_right = 1.0 +anchor_bottom = 1.0 color = Color( 0.211765, 0.294118, 0.231373, 1 ) __meta__ = { "_edit_use_anchors_": false } [node name="MapViewer" parent="." instance=ExtResource( 2 )] -margin_left = 212.0 -margin_right = 812.0 +anchor_left = 0.5 +anchor_right = 0.5 +margin_left = -300.0 +margin_right = 300.0 margin_bottom = 600.0 -[node name="Captions" type="Node" parent="."] +[node name="Captions" type="Control" parent="."] +anchor_bottom = 1.0 +margin_right = 192.0 +__meta__ = { +"_edit_use_anchors_": false +} [node name="Entrance" type="ColorRect" parent="Captions"] margin_left = 24.0