Skip to content

Commit 069e7e2

Browse files
committed
fix up UI a little bit
1 parent ae3ed65 commit 069e7e2

File tree

6 files changed

+101
-45
lines changed

6 files changed

+101
-45
lines changed

assets/fonts/Roboto-Regular.ttf

164 KB
Binary file not shown.
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
[remap]
2+
3+
importer="font_data_dynamic"
4+
type="FontFile"
5+
uid="uid://dmenuy01n8uk3"
6+
path="res://.godot/imported/Roboto-Regular.ttf-e67097a08cc051e6b179dbaab401b2bc.fontdata"
7+
8+
[deps]
9+
10+
source_file="res://assets/fonts/Roboto-Regular.ttf"
11+
dest_files=["res://.godot/imported/Roboto-Regular.ttf-e67097a08cc051e6b179dbaab401b2bc.fontdata"]
12+
13+
[params]
14+
15+
Rendering=null
16+
antialiasing=1
17+
generate_mipmaps=false
18+
multichannel_signed_distance_field=false
19+
msdf_pixel_range=8
20+
msdf_size=48
21+
allow_system_fallback=true
22+
force_autohinter=false
23+
hinting=1
24+
subpixel_positioning=1
25+
oversampling=0.0
26+
Fallbacks=null
27+
fallbacks=[]
28+
Compress=null
29+
compress=true
30+
preload=[]
31+
language_support={}
32+
script_support={}
33+
opentype_features={}

level/level.tscn

Lines changed: 25 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,7 @@ offset_top = 608.0
122122
offset_right = 350.0
123123
offset_bottom = 639.0
124124
theme = ExtResource("3_ynjfq")
125+
theme_override_font_sizes/font_size = 14
125126
placeholder_text = "Message..."
126127
flat = true
127128

@@ -206,11 +207,9 @@ offset_top = -68.0
206207
offset_right = -1.0
207208
grow_horizontal = 0
208209
grow_vertical = 0
209-
theme = ExtResource("3_ynjfq")
210210

211211
[node name="VBoxContainer" type="VBoxContainer" parent="GameUI/AmmoUI"]
212212
layout_mode = 2
213-
theme = ExtResource("3_ynjfq")
214213

215214
[node name="PrimaryAmmo" type="Label" parent="GameUI/AmmoUI/VBoxContainer"]
216215
unique_name_in_owner = true
@@ -247,53 +246,60 @@ layout_mode = 2
247246
layout_mode = 2
248247

249248
[node name="RiflesLabel" type="Label" parent="GameUI/ShopUI/VBoxContainer/Rifles"]
250-
custom_minimum_size = Vector2(60, 0)
249+
custom_minimum_size = Vector2(80, 0)
251250
layout_mode = 2
251+
theme_override_font_sizes/font_size = 12
252252
text = "Rifles:"
253253
horizontal_alignment = 1
254254

255255
[node name="AK47" type="Button" parent="GameUI/ShopUI/VBoxContainer/Rifles" groups=["BuyButton"]]
256-
custom_minimum_size = Vector2(75, 0)
256+
custom_minimum_size = Vector2(80, 0)
257257
layout_mode = 2
258+
theme_override_font_sizes/font_size = 12
258259
text = "AK-47
259260
$2700"
260261
script = ExtResource("5_ge0j8")
261262

262263
[node name="M4A4" type="Button" parent="GameUI/ShopUI/VBoxContainer/Rifles" groups=["BuyButton"]]
263-
custom_minimum_size = Vector2(75, 0)
264+
custom_minimum_size = Vector2(80, 0)
264265
layout_mode = 2
266+
theme_override_font_sizes/font_size = 12
265267
text = "M4A4
266268
$3100"
267269
script = ExtResource("5_ge0j8")
268270
buy_item = "m4a4"
269271

270272
[node name="SG553" type="Button" parent="GameUI/ShopUI/VBoxContainer/Rifles" groups=["BuyButton"]]
271-
custom_minimum_size = Vector2(75, 0)
273+
custom_minimum_size = Vector2(80, 0)
272274
layout_mode = 2
275+
theme_override_font_sizes/font_size = 12
273276
text = "SG 553
274277
$3000"
275278
script = ExtResource("5_ge0j8")
276279
buy_item = "sg-553"
277280

278281
[node name="AUG" type="Button" parent="GameUI/ShopUI/VBoxContainer/Rifles" groups=["BuyButton"]]
279-
custom_minimum_size = Vector2(75, 0)
282+
custom_minimum_size = Vector2(80, 0)
280283
layout_mode = 2
284+
theme_override_font_sizes/font_size = 12
281285
text = "AUG
282286
$3300"
283287
script = ExtResource("5_ge0j8")
284288
buy_item = "aug"
285289

286290
[node name="AWP" type="Button" parent="GameUI/ShopUI/VBoxContainer/Rifles" groups=["BuyButton"]]
287-
custom_minimum_size = Vector2(75, 0)
291+
custom_minimum_size = Vector2(80, 0)
288292
layout_mode = 2
293+
theme_override_font_sizes/font_size = 12
289294
text = "AWP
290295
$4750"
291296
script = ExtResource("5_ge0j8")
292297
buy_item = "awp"
293298

294299
[node name="SSG" type="Button" parent="GameUI/ShopUI/VBoxContainer/Rifles" groups=["BuyButton"]]
295-
custom_minimum_size = Vector2(75, 0)
300+
custom_minimum_size = Vector2(80, 0)
296301
layout_mode = 2
302+
theme_override_font_sizes/font_size = 12
297303
text = "SSG 08
298304
$1700"
299305
script = ExtResource("5_ge0j8")
@@ -303,22 +309,25 @@ buy_item = "ssg-08"
303309
layout_mode = 2
304310

305311
[node name="PistolsLabel" type="Label" parent="GameUI/ShopUI/VBoxContainer/Pistols"]
306-
custom_minimum_size = Vector2(60, 0)
312+
custom_minimum_size = Vector2(80, 0)
307313
layout_mode = 2
314+
theme_override_font_sizes/font_size = 12
308315
text = "Pistols:"
309316
horizontal_alignment = 1
310317

311318
[node name="Glock18" type="Button" parent="GameUI/ShopUI/VBoxContainer/Pistols" groups=["BuyButton"]]
312-
custom_minimum_size = Vector2(75, 0)
319+
custom_minimum_size = Vector2(80, 0)
313320
layout_mode = 2
321+
theme_override_font_sizes/font_size = 12
314322
text = "Glock 18
315323
$400"
316324
script = ExtResource("5_ge0j8")
317325
buy_item = "glock-18"
318326

319327
[node name="USP" type="Button" parent="GameUI/ShopUI/VBoxContainer/Pistols" groups=["BuyButton"]]
320-
custom_minimum_size = Vector2(75, 0)
328+
custom_minimum_size = Vector2(80, 0)
321329
layout_mode = 2
330+
theme_override_font_sizes/font_size = 12
322331
text = "USP
323332
$500"
324333
script = ExtResource("5_ge0j8")
@@ -342,9 +351,10 @@ anchor_left = 1.0
342351
anchor_top = 1.0
343352
anchor_right = 1.0
344353
anchor_bottom = 1.0
345-
offset_left = -121.0
346-
offset_top = -125.0
347-
offset_bottom = -61.0
354+
offset_left = -210.0
355+
offset_top = -174.0
356+
offset_right = -2.0
357+
offset_bottom = -55.0
348358
grow_horizontal = 0
349359
grow_vertical = 0
350360
theme = ExtResource("3_ynjfq")

multiplayer/multiplayer.tscn

Lines changed: 24 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1-
[gd_scene load_steps=5 format=3 uid="uid://3begruyw7wti"]
1+
[gd_scene load_steps=6 format=3 uid="uid://3begruyw7wti"]
22

33
[ext_resource type="Script" path="res://multiplayer/multiplayer.gd" id="1_tv1bw"]
44
[ext_resource type="PackedScene" uid="uid://bqn3h56ch5gtd" path="res://player/player.tscn" id="2_pbl3c"]
55
[ext_resource type="Theme" uid="uid://b2kensy6ma0e6" path="res://ui/theme/main.tres" id="3_2mwus"]
66
[ext_resource type="PackedScene" uid="uid://bu74xn3hlof5n" path="res://level/level.tscn" id="3_qf10t"]
7+
[ext_resource type="FontFile" uid="uid://kn7qq7iwgrl5" path="res://assets/fonts/High Speed.otf" id="4_7sus0"]
78

89
[node name="Multiplayer" type="Node2D"]
910
script = ExtResource("1_tv1bw")
@@ -22,47 +23,65 @@ layout_mode = 2
2223
layout_mode = 2
2324

2425
[node name="Host" type="Button" parent="MenuUI/CenterContainer/HBoxContainer"]
26+
custom_minimum_size = Vector2(130, 25)
2527
layout_mode = 2
2628
theme = ExtResource("3_2mwus")
29+
theme_override_fonts/font = ExtResource("4_7sus0")
30+
theme_override_font_sizes/font_size = 12
2731
text = "Host Game"
2832

2933
[node name="Start" type="Button" parent="MenuUI/CenterContainer/HBoxContainer"]
3034
unique_name_in_owner = true
35+
custom_minimum_size = Vector2(130, 25)
3136
layout_mode = 2
3237
theme = ExtResource("3_2mwus")
38+
theme_override_fonts/font = ExtResource("4_7sus0")
39+
theme_override_font_sizes/font_size = 12
3340
disabled = true
3441
text = "Start Game"
3542

3643
[node name="Join" type="Button" parent="MenuUI/CenterContainer/HBoxContainer"]
44+
custom_minimum_size = Vector2(130, 25)
3745
layout_mode = 2
3846
theme = ExtResource("3_2mwus")
47+
theme_override_fonts/font = ExtResource("4_7sus0")
48+
theme_override_font_sizes/font_size = 12
3949
text = "Join Game"
4050

4151
[node name="Username" type="LineEdit" parent="MenuUI/CenterContainer/HBoxContainer"]
4252
unique_name_in_owner = true
53+
custom_minimum_size = Vector2(100, 25)
4354
layout_mode = 2
4455
theme = ExtResource("3_2mwus")
56+
theme_override_fonts/font = ExtResource("4_7sus0")
57+
theme_override_font_sizes/font_size = 12
4558
placeholder_text = "Guest"
59+
alignment = 1
4660
expand_to_text_length = true
4761

4862
[node name="Address" type="LineEdit" parent="MenuUI/CenterContainer/HBoxContainer"]
4963
unique_name_in_owner = true
64+
custom_minimum_size = Vector2(100, 25)
5065
layout_mode = 2
5166
theme = ExtResource("3_2mwus")
67+
theme_override_fonts/font = ExtResource("4_7sus0")
68+
theme_override_font_sizes/font_size = 12
5269
text = "127.0.0.1"
70+
alignment = 1
5371
expand_to_text_length = true
5472

5573
[node name="Port" type="LineEdit" parent="MenuUI/CenterContainer/HBoxContainer"]
5674
unique_name_in_owner = true
75+
custom_minimum_size = Vector2(100, 25)
5776
layout_mode = 2
5877
theme = ExtResource("3_2mwus")
78+
theme_override_fonts/font = ExtResource("4_7sus0")
79+
theme_override_font_sizes/font_size = 12
5980
text = "9595"
60-
61-
[node name="Label" type="Label" parent="MenuUI/CenterContainer/HBoxContainer"]
62-
layout_mode = 2
63-
theme = ExtResource("3_2mwus")
81+
alignment = 1
6482

6583
[node name="Level" parent="." instance=ExtResource("3_qf10t")]
84+
scale = Vector2(0.993144, 1.02031)
6685

6786
[node name="MultiplayerSpawner" type="MultiplayerSpawner" parent="."]
6887
_spawnable_scenes = PackedStringArray("res://player/player.tscn")

ui/theme/default_stylebox.tres

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,8 @@
22

33
[resource]
44
bg_color = Color(0, 0, 0, 0.376471)
5+
border_color = Color(0, 0, 0, 0.564706)
6+
corner_radius_top_left = 10
7+
corner_radius_top_right = 10
8+
corner_radius_bottom_right = 10
9+
corner_radius_bottom_left = 10

ui/theme/main.tres

Lines changed: 14 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,29 @@
1-
[gd_resource type="Theme" load_steps=12 format=3 uid="uid://b2kensy6ma0e6"]
1+
[gd_resource type="Theme" load_steps=5 format=3 uid="uid://b2kensy6ma0e6"]
22

33
[ext_resource type="FontFile" uid="uid://kn7qq7iwgrl5" path="res://assets/fonts/High Speed.otf" id="1_k88yq"]
44
[ext_resource type="StyleBox" uid="uid://cgrxkibwpb6dq" path="res://ui/theme/default_stylebox.tres" id="2_dkcn6"]
55

6-
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_xept5"]
7-
bg_color = Color(0, 0, 0, 0.243137)
8-
9-
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_tyhi1"]
10-
11-
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_skxdc"]
12-
bg_color = Color(0, 0, 0, 0.501961)
13-
14-
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_84kj0"]
15-
bg_color = Color(0, 0, 0, 0.376471)
16-
17-
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_jay0j"]
18-
19-
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_kjyk5"]
20-
21-
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_eaaci"]
22-
236
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_brqbo"]
247
bg_color = Color(1, 0.341176, 0.298039, 1)
258

269
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_tp058"]
2710
bg_color = Color(0.470588, 0.945098, 0, 1)
2811

2912
[resource]
30-
Button/styles/disabled = SubResource("StyleBoxFlat_xept5")
31-
Button/styles/focus = SubResource("StyleBoxFlat_tyhi1")
32-
Button/styles/hover = SubResource("StyleBoxFlat_skxdc")
33-
Button/styles/normal = SubResource("StyleBoxFlat_84kj0")
34-
Button/styles/pressed = SubResource("StyleBoxFlat_jay0j")
13+
Button/fonts/font = ExtResource("1_k88yq")
14+
Button/styles/disabled = ExtResource("2_dkcn6")
15+
Button/styles/focus = ExtResource("2_dkcn6")
16+
Button/styles/hover = ExtResource("2_dkcn6")
17+
Button/styles/normal = ExtResource("2_dkcn6")
18+
Button/styles/pressed = ExtResource("2_dkcn6")
19+
Label/colors/font_outline_color = Color(0, 0, 0, 1)
20+
Label/constants/outline_size = 2
21+
Label/font_sizes/font_size = 14
3522
Label/fonts/font = ExtResource("1_k88yq")
36-
LineEdit/styles/focus = SubResource("StyleBoxFlat_kjyk5")
23+
LineEdit/font_sizes/font_size = 14
24+
LineEdit/fonts/font = ExtResource("1_k88yq")
25+
LineEdit/styles/focus = ExtResource("2_dkcn6")
3726
LineEdit/styles/normal = ExtResource("2_dkcn6")
38-
LineEdit/styles/read_only = SubResource("StyleBoxFlat_eaaci")
27+
LineEdit/styles/read_only = ExtResource("2_dkcn6")
3928
ProgressBar/styles/background = SubResource("StyleBoxFlat_brqbo")
4029
ProgressBar/styles/fill = SubResource("StyleBoxFlat_tp058")

0 commit comments

Comments
 (0)