From 5e3255bfc98d1ecd3ac030b12e6c5f46a8b1891e Mon Sep 17 00:00:00 2001 From: Victor Turgeon Date: Sun, 11 Jun 2023 14:38:44 -0400 Subject: [PATCH] menu ui scaling --- menu/start_game_menu.tscn | 86 +++++++++++++++++++++++++-------------- 1 file changed, 56 insertions(+), 30 deletions(-) diff --git a/menu/start_game_menu.tscn b/menu/start_game_menu.tscn index 0d25781..8850a62 100644 --- a/menu/start_game_menu.tscn +++ b/menu/start_game_menu.tscn @@ -1,10 +1,10 @@ [gd_scene load_steps=10 format=3 uid="uid://4tym1auav4yv"] [ext_resource type="Script" path="res://menu/start_game_menu.cs" id="1_0k2xm"] -[ext_resource type="Texture2D" uid="uid://b44vs2lwgnh37" path="res://images/mushroom_cloud001.webp" id="2_aky60"] -[ext_resource type="AudioStream" uid="uid://ckg5eypyrhidg" path="res://music/I Feel Grunge (Slow).wav" id="2_yw57x"] -[ext_resource type="AudioStream" uid="uid://c8dcqkmytnyay" path="res://audio/btn.wav" id="4_fx2mk"] -[ext_resource type="AudioStream" uid="uid://dja6tipmq1m8l" path="res://audio/dot.wav" id="5_y8gc7"] +[ext_resource type="Texture2D" uid="uid://bd7j1ug5gs26w" path="res://images/mushroom_cloud001.webp" id="2_aky60"] +[ext_resource type="AudioStream" uid="uid://co52ygvp3wcra" path="res://music/I Feel Grunge (Slow).wav" id="2_yw57x"] +[ext_resource type="AudioStream" uid="uid://ds7ec1n3pytnr" path="res://audio/btn.wav" id="4_fx2mk"] +[ext_resource type="AudioStream" uid="uid://cg78xtngxrjlg" path="res://audio/dot.wav" id="5_y8gc7"] [sub_resource type="LabelSettings" id="LabelSettings_n38oc"] font_size = 290 @@ -37,26 +37,46 @@ script = ExtResource("1_0k2xm") _sndBtn = NodePath("Button") _sndState = NodePath("State") -[node name="MushroomCloud001" type="Sprite2D" parent="."] -modulate = Color(0.317647, 0.133333, 0.137255, 1) -position = Vector2(942, 482) +[node name="TextureRect" type="TextureRect" parent="."] +self_modulate = Color(0.443137, 0.117647, 0.145098, 1) +layout_mode = 1 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 texture = ExtResource("2_aky60") +expand_mode = 1 [node name="Lbl_Title" type="Label" parent="."] -layout_mode = 0 -offset_left = 547.0 -offset_top = 224.0 -offset_right = 1460.0 -offset_bottom = 622.0 +layout_mode = 1 +anchors_preset = 8 +anchor_left = 0.5 +anchor_top = 0.5 +anchor_right = 0.5 +anchor_bottom = 0.5 +offset_left = -416.5 +offset_top = -199.0 +offset_right = 416.5 +offset_bottom = 199.0 +grow_horizontal = 2 +grow_vertical = 2 text = "M.A.D" label_settings = SubResource("LabelSettings_n38oc") [node name="Btn_Single" type="Button" parent="."] -layout_mode = 0 -offset_left = 617.0 -offset_top = 674.0 -offset_right = 800.0 -offset_bottom = 705.0 +layout_mode = 1 +anchors_preset = 8 +anchor_left = 0.5 +anchor_top = 0.5 +anchor_right = 0.5 +anchor_bottom = 0.5 +offset_left = -91.5 +offset_top = 156.0 +offset_right = 91.5 +offset_bottom = 187.0 +grow_horizontal = 2 +grow_vertical = 2 shortcut = SubResource("Shortcut_pweny") text = "Single Player " @@ -89,11 +109,18 @@ offset_bottom = 818.0 text = "Cancel" [node name="Btn_Quit" type="Button" parent="."] -layout_mode = 0 -offset_left = 949.0 -offset_top = 786.0 -offset_right = 1283.0 -offset_bottom = 817.0 +layout_mode = 1 +anchors_preset = 8 +anchor_left = 0.5 +anchor_top = 0.5 +anchor_right = 0.5 +anchor_bottom = 0.5 +offset_left = -167.0 +offset_top = 194.0 +offset_right = 167.0 +offset_bottom = 225.0 +grow_horizontal = 2 +grow_vertical = 2 text = "Quit Game" [node name="Btn_Yes" type="Button" parent="."] @@ -152,15 +179,14 @@ text = "Remote Host IP Address:" [node name="lbl_err" type="Label" parent="."] layout_mode = 1 -anchors_preset = 15 -anchor_right = 1.0 -anchor_bottom = 1.0 -offset_left = 627.0 -offset_top = 580.0 -offset_right = -644.0 -offset_bottom = -461.0 +anchors_preset = 5 +anchor_left = 0.5 +anchor_right = 0.5 +offset_left = -0.5 +offset_top = 29.0 +offset_right = 0.5 +offset_bottom = 52.0 grow_horizontal = 2 -grow_vertical = 2 horizontal_alignment = 1 [node name="Music" type="AudioStreamPlayer" parent="."]