From a3dd437e0863b93bdfa0ae2f2aabbcc08b8c3919 Mon Sep 17 00:00:00 2001 From: Rahul Gandharva Date: Thu, 2 Sep 2021 08:54:18 +1000 Subject: [PATCH] Increased spacing between buttons. Made font resources to unify future changes in font size. --- Assets/Fonts/Font_100.tres | 7 +++ Assets/Fonts/Font_200.tres | 7 +++ .../Font_50.tres} | 0 Scenes/Levels/Level Components/Player.tscn | 2 +- Scenes/Levels/Level Main.tscn | 63 ++++++++++++------- Scenes/UI/Help Menu.tscn | 29 +++++---- Scenes/UI/Host Guest.tscn | 26 ++++---- Scenes/UI/IP Select.tscn | 30 ++++----- Scenes/UI/Level Select.tscn | 44 ++++++------- Scenes/UI/Local Online.tscn | 34 +++++----- Scenes/UI/Menu Item.tscn | 17 ++--- Scenes/UI/Waiting.tscn | 24 +++---- 12 files changed, 151 insertions(+), 132 deletions(-) create mode 100644 Assets/Fonts/Font_100.tres create mode 100644 Assets/Fonts/Font_200.tres rename Assets/{new_dynamicfont.tres => Fonts/Font_50.tres} (100%) diff --git a/Assets/Fonts/Font_100.tres b/Assets/Fonts/Font_100.tres new file mode 100644 index 0000000..fbb8088 --- /dev/null +++ b/Assets/Fonts/Font_100.tres @@ -0,0 +1,7 @@ +[gd_resource type="DynamicFont" load_steps=2 format=2] + +[ext_resource path="res://Assets/Montserrat-Regular.ttf" type="DynamicFontData" id=1] + +[resource] +size = 100 +font_data = ExtResource( 1 ) diff --git a/Assets/Fonts/Font_200.tres b/Assets/Fonts/Font_200.tres new file mode 100644 index 0000000..57b2c8f --- /dev/null +++ b/Assets/Fonts/Font_200.tres @@ -0,0 +1,7 @@ +[gd_resource type="DynamicFont" load_steps=2 format=2] + +[ext_resource path="res://Assets/Montserrat-Regular.ttf" type="DynamicFontData" id=1] + +[resource] +size = 200 +font_data = ExtResource( 1 ) diff --git a/Assets/new_dynamicfont.tres b/Assets/Fonts/Font_50.tres similarity index 100% rename from Assets/new_dynamicfont.tres rename to Assets/Fonts/Font_50.tres diff --git a/Scenes/Levels/Level Components/Player.tscn b/Scenes/Levels/Level Components/Player.tscn index c1d1f88..42ed3dc 100644 --- a/Scenes/Levels/Level Components/Player.tscn +++ b/Scenes/Levels/Level Components/Player.tscn @@ -5,7 +5,7 @@ [ext_resource path="res://Assets/label_background.tres" type="StyleBox" id=3] [sub_resource type="DynamicFont" id=1] -size = 25 +size = 50 font_data = ExtResource( 2 ) [node name="Player" type="Node2D"] diff --git a/Scenes/Levels/Level Main.tscn b/Scenes/Levels/Level Main.tscn index 444feb6..4f3b5c4 100644 --- a/Scenes/Levels/Level Main.tscn +++ b/Scenes/Levels/Level Main.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=16 format=2] +[gd_scene load_steps=17 format=2] [ext_resource path="res://Assets/Our World.png" type="Texture" id=1] [ext_resource path="res://Scripts/Levels/Level Main.gd" type="Script" id=2] @@ -7,7 +7,7 @@ [ext_resource path="res://Assets/No Mans Land.png" type="Texture" id=5] [ext_resource path="res://Scenes/Levels/Level Components/Player.tscn" type="PackedScene" id=6] [ext_resource path="res://Assets/Montserrat-Regular.ttf" type="DynamicFontData" id=7] -[ext_resource path="res://Assets/new_dynamicfont.tres" type="DynamicFont" id=8] +[ext_resource path="res://Assets/Fonts/Font_50.tres" type="DynamicFont" id=8] [ext_resource path="res://Assets/zoom-out-line.svg" type="Texture" id=9] [ext_resource path="res://Assets/zoom-in-line.svg" type="Texture" id=10] [ext_resource path="res://Assets/expand-arrow.svg" type="Texture" id=11] @@ -16,10 +16,15 @@ [ext_resource path="res://Assets/Parallax Background.png" type="Texture" id=14] [sub_resource type="DynamicFont" id=1] -size = 25 +size = 50 +font_data = ExtResource( 7 ) + +[sub_resource type="DynamicFont" id=2] +size = 50 font_data = ExtResource( 7 ) [node name="Level 1" type="Node2D"] +position = Vector2( 122.348, 0 ) script = ExtResource( 2 ) [node name="CanvasLayer" type="CanvasLayer" parent="."] @@ -35,14 +40,18 @@ __meta__ = { } [node name="Player Red" parent="CanvasLayer" instance=ExtResource( 6 )] -position = Vector2( 0, 300 ) +position = Vector2( 0, 251 ) [node name="Player Blue" parent="CanvasLayer" instance=ExtResource( 6 )] -position = Vector2( 0, 450 ) +position = Vector2( 0, 513 ) [node name="End Attack" type="Button" parent="CanvasLayer"] visible = false -margin_right = 125.0 +anchor_left = 0.0637231 +anchor_right = 0.149661 +anchor_bottom = 0.0351852 +margin_left = -0.348328 +margin_right = 124.652 margin_bottom = 30.0 custom_fonts/font = ExtResource( 8 ) text = "End Attack" @@ -52,19 +61,22 @@ __meta__ = { [node name="End Reinforcement" type="Button" parent="CanvasLayer"] visible = false -margin_left = 290.0 -margin_right = 792.0 +anchor_left = 0.0637231 +anchor_right = 0.0637231 +margin_left = 289.652 +margin_right = 791.652 margin_bottom = 68.0 -custom_fonts/font = ExtResource( 8 ) +custom_fonts/font = SubResource( 1 ) text = "End Reinforcement" __meta__ = { "_edit_use_anchors_": false } [node name="Reroll Spawn" type="Button" parent="CanvasLayer"] -margin_top = 940.0 -margin_right = 341.0 -margin_bottom = 1008.0 +margin_left = 0.0701532 +margin_top = 932.034 +margin_right = 341.07 +margin_bottom = 1000.03 custom_fonts/font = ExtResource( 8 ) text = "Reroll Spawn" __meta__ = { @@ -72,9 +84,10 @@ __meta__ = { } [node name="Start Game" type="Button" parent="CanvasLayer"] -margin_top = 1010.0 -margin_right = 298.0 -margin_bottom = 1078.0 +margin_left = 0.0701532 +margin_top = 1012.03 +margin_right = 298.07 +margin_bottom = 1080.03 custom_fonts/font = ExtResource( 8 ) text = "Start Game" __meta__ = { @@ -82,9 +95,10 @@ __meta__ = { } [node name="Play Blue" type="Button" parent="CanvasLayer"] -margin_top = 804.0 -margin_right = 464.0 -margin_bottom = 872.0 +margin_left = 0.0701532 +margin_top = 796.034 +margin_right = 464.07 +margin_bottom = 864.034 custom_fonts/font = ExtResource( 8 ) text = "Host plays as Blue" __meta__ = { @@ -92,9 +106,10 @@ __meta__ = { } [node name="Play Red" type="Button" parent="CanvasLayer"] -margin_top = 734.0 -margin_right = 449.0 -margin_bottom = 802.0 +margin_left = 0.0701532 +margin_top = 716.034 +margin_right = 449.07 +margin_bottom = 784.034 custom_fonts/font = ExtResource( 8 ) text = "Host plays as Red" __meta__ = { @@ -102,11 +117,11 @@ __meta__ = { } [node name="Player and Round Tracker" type="Label" parent="CanvasLayer"] -margin_top = 200.0 +margin_top = 119.0 margin_right = 40.0 -margin_bottom = 221.0 +margin_bottom = 181.0 custom_styles/normal = ExtResource( 13 ) -custom_fonts/font = SubResource( 1 ) +custom_fonts/font = SubResource( 2 ) __meta__ = { "_edit_use_anchors_": false } diff --git a/Scenes/UI/Help Menu.tscn b/Scenes/UI/Help Menu.tscn index 466b649..7874730 100644 --- a/Scenes/UI/Help Menu.tscn +++ b/Scenes/UI/Help Menu.tscn @@ -2,14 +2,14 @@ [ext_resource path="res://Assets/Montserrat-Regular.ttf" type="DynamicFontData" id=1] [ext_resource path="res://Scripts/UI/Help Menu.gd" type="Script" id=2] -[ext_resource path="res://Assets/new_dynamicfont.tres" type="DynamicFont" id=3] +[ext_resource path="res://Assets/Fonts/Font_50.tres" type="DynamicFont" id=3] [sub_resource type="DynamicFont" id=1] -size = 100 +size = 200 font_data = ExtResource( 1 ) [sub_resource type="DynamicFont" id=2] -size = 20 +size = 25 font_data = ExtResource( 1 ) [node name="Menu1" type="Control"] @@ -28,26 +28,25 @@ __meta__ = { } [node name="VBoxContainer" type="VBoxContainer" parent="CenterContainer"] -margin_left = 302.0 -margin_top = 144.0 -margin_right = 1617.0 -margin_bottom = 935.0 +margin_left = 41.0 +margin_top = 14.0 +margin_right = 1879.0 +margin_bottom = 1065.0 [node name="CenterContainer" type="CenterContainer" parent="CenterContainer/VBoxContainer"] -margin_right = 1315.0 -margin_bottom = 123.0 +margin_right = 1838.0 +margin_bottom = 245.0 [node name="Label" type="Label" parent="CenterContainer/VBoxContainer/CenterContainer"] -margin_left = 198.0 -margin_right = 1117.0 -margin_bottom = 123.0 +margin_right = 1838.0 +margin_bottom = 245.0 custom_fonts/font = SubResource( 1 ) text = "Deterministic Risk" [node name="Label2" type="Label" parent="CenterContainer/VBoxContainer"] -margin_top = 127.0 -margin_right = 1315.0 -margin_bottom = 791.0 +margin_top = 249.0 +margin_right = 1838.0 +margin_bottom = 1051.0 custom_fonts/font = SubResource( 2 ) custom_colors/font_color = Color( 0, 0, 0, 1 ) text = "Rules: diff --git a/Scenes/UI/Host Guest.tscn b/Scenes/UI/Host Guest.tscn index 4bbd5d9..5da0609 100644 --- a/Scenes/UI/Host Guest.tscn +++ b/Scenes/UI/Host Guest.tscn @@ -5,7 +5,7 @@ [ext_resource path="res://Scenes/UI/Menu Item.tscn" type="PackedScene" id=3] [sub_resource type="DynamicFont" id=1] -size = 100 +size = 200 font_data = ExtResource( 1 ) [node name="Menu1" type="Control"] @@ -20,15 +20,15 @@ margin_right = 1920.0 margin_bottom = 1080.0 [node name="VBoxContainer" type="VBoxContainer" parent="CenterContainer"] -margin_left = 500.0 -margin_top = 404.0 -margin_right = 1419.0 -margin_bottom = 675.0 +margin_left = 41.0 +margin_top = 282.0 +margin_right = 1879.0 +margin_bottom = 797.0 script = ExtResource( 2 ) [node name="Label" type="Label" parent="CenterContainer/VBoxContainer"] -margin_right = 919.0 -margin_bottom = 123.0 +margin_right = 1838.0 +margin_bottom = 245.0 custom_fonts/font = SubResource( 1 ) text = "Deterministic Risk" @@ -36,16 +36,16 @@ text = "Deterministic Risk" anchor_left = 0.0 anchor_right = 0.0 anchor_bottom = 0.0 -margin_top = 127.0 -margin_right = 919.0 -margin_bottom = 197.0 +margin_top = 249.0 +margin_right = 1838.0 +margin_bottom = 380.0 item_name = "Host" [node name="Guest" parent="CenterContainer/VBoxContainer" instance=ExtResource( 3 )] anchor_left = 0.0 anchor_right = 0.0 anchor_bottom = 0.0 -margin_top = 201.0 -margin_right = 919.0 -margin_bottom = 271.0 +margin_top = 384.0 +margin_right = 1838.0 +margin_bottom = 515.0 item_name = "Guest" diff --git a/Scenes/UI/IP Select.tscn b/Scenes/UI/IP Select.tscn index 555766b..87a8090 100644 --- a/Scenes/UI/IP Select.tscn +++ b/Scenes/UI/IP Select.tscn @@ -1,12 +1,12 @@ [gd_scene load_steps=6 format=2] -[ext_resource path="res://Assets/new_dynamicfont.tres" type="DynamicFont" id=1] +[ext_resource path="res://Assets/Fonts/Font_100.tres" type="DynamicFont" id=1] [ext_resource path="res://Scripts/UI/IP Select.gd" type="Script" id=2] [ext_resource path="res://Scenes/UI/Menu Item.tscn" type="PackedScene" id=3] [ext_resource path="res://Assets/Montserrat-Regular.ttf" type="DynamicFontData" id=4] [sub_resource type="DynamicFont" id=1] -size = 100 +size = 200 font_data = ExtResource( 4 ) [node name="Menu1" type="Control"] @@ -24,23 +24,23 @@ __meta__ = { } [node name="VBoxContainer" type="VBoxContainer" parent="CenterContainer"] -margin_left = 500.0 -margin_top = 409.0 -margin_right = 1419.0 -margin_bottom = 670.0 +margin_left = 41.0 +margin_top = 280.0 +margin_right = 1879.0 +margin_bottom = 799.0 script = ExtResource( 2 ) [node name="Label" type="Label" parent="CenterContainer/VBoxContainer"] -margin_right = 919.0 -margin_bottom = 123.0 +margin_right = 1838.0 +margin_bottom = 245.0 custom_fonts/font = SubResource( 1 ) text = "Deterministic Risk" [node name="TextEdit" type="TextEdit" parent="CenterContainer/VBoxContainer"] -margin_top = 127.0 -margin_right = 919.0 -margin_bottom = 187.0 -rect_min_size = Vector2( 0, 60 ) +margin_top = 249.0 +margin_right = 1838.0 +margin_bottom = 384.251 +rect_min_size = Vector2( 0, 135.251 ) custom_fonts/font = ExtResource( 1 ) text = "IP: " @@ -48,7 +48,7 @@ text = "IP: " anchor_left = 0.0 anchor_right = 0.0 anchor_bottom = 0.0 -margin_top = 191.0 -margin_right = 919.0 -margin_bottom = 261.0 +margin_top = 388.0 +margin_right = 1838.0 +margin_bottom = 519.0 item_name = "Connect" diff --git a/Scenes/UI/Level Select.tscn b/Scenes/UI/Level Select.tscn index 1ea3d5f..8e2d969 100644 --- a/Scenes/UI/Level Select.tscn +++ b/Scenes/UI/Level Select.tscn @@ -1,7 +1,7 @@ [gd_scene load_steps=11 format=2] [ext_resource path="res://Assets/Montserrat-Regular.ttf" type="DynamicFontData" id=1] -[ext_resource path="res://Assets/new_dynamicfont.tres" type="DynamicFont" id=2] +[ext_resource path="res://Assets/Fonts/Font_100.tres" type="DynamicFont" id=2] [ext_resource path="res://Assets/No Mans Land.png" type="Texture" id=3] [ext_resource path="res://Assets/Our World.png" type="Texture" id=4] [ext_resource path="res://Assets/Crucible.png" type="Texture" id=5] @@ -11,7 +11,7 @@ [ext_resource path="res://Assets/No Mans Land Hover.png" type="Texture" id=9] [sub_resource type="DynamicFont" id=1] -size = 100 +size = 200 font_data = ExtResource( 1 ) [node name="Menu1" type="Control"] @@ -31,31 +31,30 @@ __meta__ = { } [node name="VBoxContainer" type="VBoxContainer" parent="CenterContainer"] -margin_left = 154.0 -margin_top = 243.0 -margin_right = 1766.0 -margin_bottom = 836.0 +margin_left = 41.0 +margin_top = 151.0 +margin_right = 1879.0 +margin_bottom = 927.0 [node name="CenterContainer3" type="CenterContainer" parent="CenterContainer/VBoxContainer"] -margin_right = 1612.0 -margin_bottom = 123.0 +margin_right = 1838.0 +margin_bottom = 245.0 [node name="Label" type="Label" parent="CenterContainer/VBoxContainer/CenterContainer3"] -margin_left = 346.0 -margin_right = 1265.0 -margin_bottom = 123.0 +margin_right = 1838.0 +margin_bottom = 245.0 custom_fonts/font = SubResource( 1 ) text = "Deterministic Risk" [node name="CenterContainer2" type="CenterContainer" parent="CenterContainer/VBoxContainer"] -margin_top = 127.0 -margin_right = 1612.0 -margin_bottom = 189.0 +margin_top = 249.0 +margin_right = 1838.0 +margin_bottom = 372.0 [node name="Label2" type="Label" parent="CenterContainer/VBoxContainer/CenterContainer2"] -margin_left = 659.0 -margin_right = 953.0 -margin_bottom = 62.0 +margin_left = 623.0 +margin_right = 1215.0 +margin_bottom = 123.0 custom_fonts/font = ExtResource( 2 ) text = "Select Level" __meta__ = { @@ -63,12 +62,13 @@ __meta__ = { } [node name="CenterContainer" type="CenterContainer" parent="CenterContainer/VBoxContainer"] -margin_top = 193.0 -margin_right = 1612.0 -margin_bottom = 593.0 +margin_top = 376.0 +margin_right = 1838.0 +margin_bottom = 776.0 [node name="HBoxContainer" type="HBoxContainer" parent="CenterContainer/VBoxContainer/CenterContainer"] -margin_right = 1612.0 +margin_left = 63.0 +margin_right = 1775.0 margin_bottom = 400.0 rect_clip_content = true script = ExtResource( 6 ) @@ -104,7 +104,7 @@ stretch_mode = 5 [node name="Random" type="Button" parent="CenterContainer/VBoxContainer/CenterContainer/HBoxContainer"] margin_left = 1212.0 -margin_right = 1612.0 +margin_right = 1712.0 margin_bottom = 400.0 rect_min_size = Vector2( 400, 400 ) custom_fonts/font = ExtResource( 2 ) diff --git a/Scenes/UI/Local Online.tscn b/Scenes/UI/Local Online.tscn index d508d70..439c74b 100644 --- a/Scenes/UI/Local Online.tscn +++ b/Scenes/UI/Local Online.tscn @@ -1,13 +1,9 @@ -[gd_scene load_steps=5 format=2] +[gd_scene load_steps=4 format=2] -[ext_resource path="res://Assets/Montserrat-Regular.ttf" type="DynamicFontData" id=1] +[ext_resource path="res://Assets/Fonts/Font_200.tres" type="DynamicFont" id=1] [ext_resource path="res://Scripts/UI/Local Online.gd" type="Script" id=2] [ext_resource path="res://Scenes/UI/Menu Item.tscn" type="PackedScene" id=3] -[sub_resource type="DynamicFont" id=1] -size = 100 -font_data = ExtResource( 1 ) - [node name="Menu1" type="Control"] anchor_right = 1.0 anchor_bottom = 1.0 @@ -20,32 +16,32 @@ margin_right = 1920.0 margin_bottom = 1080.0 [node name="VBoxContainer" type="VBoxContainer" parent="CenterContainer"] -margin_left = 500.0 -margin_top = 374.0 -margin_right = 1419.0 -margin_bottom = 705.0 +margin_left = 41.0 +margin_top = 282.0 +margin_right = 1879.0 +margin_bottom = 797.0 script = ExtResource( 2 ) [node name="Label" type="Label" parent="CenterContainer/VBoxContainer"] -margin_right = 919.0 -margin_bottom = 123.0 -custom_fonts/font = SubResource( 1 ) +margin_right = 1838.0 +margin_bottom = 245.0 +custom_fonts/font = ExtResource( 1 ) text = "Deterministic Risk" [node name="Local" parent="CenterContainer/VBoxContainer" instance=ExtResource( 3 )] anchor_left = 0.0 anchor_right = 0.0 anchor_bottom = 0.0 -margin_top = 127.0 -margin_right = 919.0 -margin_bottom = 227.0 +margin_top = 249.0 +margin_right = 1838.0 +margin_bottom = 380.0 item_name = "Local" [node name="Online" parent="CenterContainer/VBoxContainer" instance=ExtResource( 3 )] anchor_left = 0.0 anchor_right = 0.0 anchor_bottom = 0.0 -margin_top = 231.0 -margin_right = 919.0 -margin_bottom = 331.0 +margin_top = 384.0 +margin_right = 1838.0 +margin_bottom = 515.0 item_name = "Online" diff --git a/Scenes/UI/Menu Item.tscn b/Scenes/UI/Menu Item.tscn index 30ea99f..d8f9d58 100644 --- a/Scenes/UI/Menu Item.tscn +++ b/Scenes/UI/Menu Item.tscn @@ -1,17 +1,12 @@ -[gd_scene load_steps=6 format=2] +[gd_scene load_steps=4 format=2] [ext_resource path="res://Scripts/UI/MenuItem.gd" type="Script" id=1] -[ext_resource path="res://Assets/new_dynamicfont.tres" type="DynamicFont" id=2] -[ext_resource path="res://Assets/Montserrat-Regular.ttf" type="DynamicFontData" id=3] +[ext_resource path="res://Assets/Fonts/Font_100.tres" type="DynamicFont" id=2] [sub_resource type="StyleBoxFlat" id=1] bg_color = Color( 1, 1, 1, 0 ) border_color = Color( 1, 1, 1, 0 ) -[sub_resource type="DynamicFont" id=2] -size = 75 -font_data = ExtResource( 3 ) - [node name="StartContainer" type="HBoxContainer"] anchor_left = -0.000424226 anchor_right = -0.000424226 @@ -35,11 +30,11 @@ custom_colors/font_color = Color( 0.101961, 0.101961, 0.101961, 1 ) text = "-" [node name="Button" type="ToolButton" parent="."] -margin_left = 300.0 -margin_right = 500.0 -margin_bottom = 100.0 +margin_left = 269.0 +margin_right = 531.0 +margin_bottom = 131.0 custom_styles/focus = SubResource( 1 ) -custom_fonts/font = SubResource( 2 ) +custom_fonts/font = ExtResource( 2 ) custom_colors/font_color = Color( 0.101961, 0.101961, 0.101961, 1 ) custom_colors/font_color_hover = Color( 0.101961, 0.101961, 0.101961, 1 ) custom_colors/font_color_pressed = Color( 0.101961, 0.101961, 0.101961, 1 ) diff --git a/Scenes/UI/Waiting.tscn b/Scenes/UI/Waiting.tscn index 9704553..bec7c0d 100644 --- a/Scenes/UI/Waiting.tscn +++ b/Scenes/UI/Waiting.tscn @@ -3,7 +3,7 @@ [ext_resource path="res://Assets/Montserrat-Regular.ttf" type="DynamicFontData" id=1] [sub_resource type="DynamicFont" id=1] -size = 100 +size = 200 font_data = ExtResource( 1 ) [sub_resource type="DynamicFont" id=2] @@ -25,25 +25,25 @@ __meta__ = { } [node name="VBoxContainer" type="VBoxContainer" parent="CenterContainer"] -margin_left = 500.0 -margin_top = 445.0 -margin_right = 1419.0 -margin_bottom = 634.0 +margin_left = 41.0 +margin_top = 384.0 +margin_right = 1879.0 +margin_bottom = 695.0 [node name="Label" type="Label" parent="CenterContainer/VBoxContainer"] -margin_right = 919.0 -margin_bottom = 123.0 +margin_right = 1838.0 +margin_bottom = 245.0 custom_fonts/font = SubResource( 1 ) text = "Deterministic Risk" [node name="CenterContainer" type="CenterContainer" parent="CenterContainer/VBoxContainer"] -margin_top = 127.0 -margin_right = 919.0 -margin_bottom = 189.0 +margin_top = 249.0 +margin_right = 1838.0 +margin_bottom = 311.0 [node name="Label2" type="Label" parent="CenterContainer/VBoxContainer/CenterContainer"] -margin_left = 359.0 -margin_right = 559.0 +margin_left = 819.0 +margin_right = 1019.0 margin_bottom = 62.0 custom_fonts/font = SubResource( 2 ) custom_colors/font_color = Color( 0, 0, 0, 1 )