Skip to content

Commit 56d6fca

Browse files
committed
feat: polish mobile UI and text
1 parent 55429c8 commit 56d6fca

File tree

6 files changed

+45
-41
lines changed

6 files changed

+45
-41
lines changed

scenes/popup_text.tscn

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,6 @@ render_priority = 1
1515
outline_render_priority = 0
1616
text = "Lorem Ipsum"
1717
font = SubResource("SystemFont_tmlj2")
18-
font_size = 42
19-
outline_size = 6
18+
font_size = 64
19+
outline_size = 8
2020
script = ExtResource("1_4m4vl")

scenes/ui/achievement_item.tscn

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ corner_radius_bottom_left = 4
1818
[node name="AchievementItem" type="PanelContainer"]
1919
anchors_preset = 10
2020
anchor_right = 1.0
21-
offset_bottom = 32.0
21+
offset_bottom = 72.0
2222
grow_horizontal = 2
2323
mouse_filter = 2
2424
theme_override_styles/panel = SubResource("StyleBoxFlat_icon_bg")
@@ -35,10 +35,10 @@ theme_override_constants/margin_bottom = 4
3535
[node name="HBoxContainer" type="HBoxContainer" parent="MarginContainer"]
3636
layout_mode = 2
3737
mouse_filter = 2
38-
theme_override_constants/separation = 8
38+
theme_override_constants/separation = 16
3939

4040
[node name="IconTexture" type="TextureRect" parent="MarginContainer/HBoxContainer"]
41-
custom_minimum_size = Vector2(32, 32)
41+
custom_minimum_size = Vector2(64, 64)
4242
layout_mode = 2
4343
size_flags_vertical = 4
4444
mouse_filter = 2
@@ -50,11 +50,11 @@ stretch_mode = 5
5050
layout_mode = 2
5151
size_flags_horizontal = 3
5252
theme_override_colors/font_color = Color(0.780392, 0.780392, 0.780392, 1)
53-
theme_override_font_sizes/font_size = 12
53+
theme_override_font_sizes/font_size = 22
5454
text = "???"
5555
vertical_alignment = 1
5656

5757
[node name="BadgesContainer" type="HBoxContainer" parent="MarginContainer/HBoxContainer"]
5858
layout_mode = 2
5959
mouse_filter = 2
60-
theme_override_constants/separation = 4
60+
theme_override_constants/separation = 8

scenes/ui/achievement_panel.tscn

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ layout_mode = 3
1212
anchors_preset = 1
1313
anchor_left = 1.0
1414
anchor_right = 1.0
15-
offset_left = -180.0
16-
offset_top = 160.0
17-
offset_right = -10.0
18-
offset_bottom = 500.0
15+
offset_left = -420.0
16+
offset_top = 100.0
17+
offset_right = -20.0
18+
offset_bottom = 840.0
1919
grow_horizontal = 0
2020
mouse_filter = 2
2121
script = ExtResource("1_nkt0o")
@@ -33,15 +33,15 @@ theme_override_styles/panel = SubResource("StyleBoxFlat_main_panel")
3333
[node name="MarginContainer" type="MarginContainer" parent="PanelContainer"]
3434
layout_mode = 2
3535
mouse_filter = 2
36-
theme_override_constants/margin_left = 8
37-
theme_override_constants/margin_top = 8
38-
theme_override_constants/margin_right = 8
39-
theme_override_constants/margin_bottom = 8
36+
theme_override_constants/margin_left = 18
37+
theme_override_constants/margin_top = 18
38+
theme_override_constants/margin_right = 18
39+
theme_override_constants/margin_bottom = 18
4040

4141
[node name="VBoxContainer" type="VBoxContainer" parent="PanelContainer/MarginContainer"]
4242
layout_mode = 2
4343
mouse_filter = 2
44-
theme_override_constants/separation = 8
44+
theme_override_constants/separation = 12
4545

4646
[node name="ScrollContainer" type="ScrollContainer" parent="PanelContainer/MarginContainer/VBoxContainer"]
4747
layout_mode = 2

scenes/ui/inventory_menu.tscn

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,10 @@ anchor_left = 0.5
4242
anchor_top = 0.5
4343
anchor_right = 0.5
4444
anchor_bottom = 0.5
45-
offset_left = -400.0
46-
offset_top = -300.0
47-
offset_right = 400.0
48-
offset_bottom = 300.0
45+
offset_left = -480.0
46+
offset_top = -340.0
47+
offset_right = 480.0
48+
offset_bottom = 340.0
4949
grow_horizontal = 2
5050
grow_vertical = 2
5151
theme_override_styles/panel = SubResource("StyleBoxFlat_1")
@@ -72,14 +72,14 @@ layout_mode = 2
7272
[node name="Title" type="Label" parent="Panel/MarginContainer/VBoxContainer/TitleSection"]
7373
layout_mode = 2
7474
theme_override_colors/font_color = Color(1, 1, 1, 1)
75-
theme_override_font_sizes/font_size = 32
75+
theme_override_font_sizes/font_size = 48
7676
text = "INVENTORY"
7777
horizontal_alignment = 1
7878

7979
[node name="Subtitle" type="Label" parent="Panel/MarginContainer/VBoxContainer/TitleSection"]
8080
layout_mode = 2
8181
theme_override_colors/font_color = Color(0.8, 0.8, 0.9, 1)
82-
theme_override_font_sizes/font_size = 16
82+
theme_override_font_sizes/font_size = 26
8383
text = "Use release button to free fish"
8484
horizontal_alignment = 1
8585

@@ -95,17 +95,17 @@ size_flags_horizontal = 3
9595

9696
[node name="FishCount" type="Label" parent="Panel/MarginContainer/VBoxContainer/InfoSection/Labels"]
9797
layout_mode = 2
98-
theme_override_font_sizes/font_size = 18
98+
theme_override_font_sizes/font_size = 26
9999
text = "Fish Count: 0"
100100

101101
[node name="TotalWeight" type="Label" parent="Panel/MarginContainer/VBoxContainer/InfoSection/Labels"]
102102
layout_mode = 2
103-
theme_override_font_sizes/font_size = 18
103+
theme_override_font_sizes/font_size = 26
104104
text = "Total Weight: 0 / 0"
105105

106106
[node name="TotalValue" type="Label" parent="Panel/MarginContainer/VBoxContainer/InfoSection/Labels"]
107107
layout_mode = 2
108-
theme_override_font_sizes/font_size = 18
108+
theme_override_font_sizes/font_size = 26
109109
text = "Total Value: $0"
110110

111111
[node name="ScrollContainer" type="ScrollContainer" parent="Panel/MarginContainer/VBoxContainer"]
@@ -139,11 +139,11 @@ alignment = 1
139139
[node name="CloseButton" type="Button" parent="Panel/MarginContainer/VBoxContainer/ButtonsContainer"]
140140
custom_minimum_size = Vector2(150, 50)
141141
layout_mode = 2
142-
theme_override_font_sizes/font_size = 18
142+
theme_override_font_sizes/font_size = 24
143143
text = "Close"
144144

145145
[node name="SellDroneButton" type="Button" parent="Panel/MarginContainer/VBoxContainer/ButtonsContainer"]
146146
custom_minimum_size = Vector2(150, 50)
147147
layout_mode = 2
148-
theme_override_font_sizes/font_size = 18
148+
theme_override_font_sizes/font_size = 24
149149
text = "Sell Drone"

scripts/destroyable_barier.gd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ func show_hint():
264264
popup_instance.duration = 4.0
265265

266266
# Make text larger for better visibility
267-
popup_instance.font_size = 42
267+
popup_instance.font_size = 72
268268

269269
# Let start_animation handle the positioning completely
270270
var hint_position = global_position + Vector3(0, 1, 0)

scripts/touch_controls.gd

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@ extends Control
22

33
const TAU := PI * 2.0
44

5+
const COLOR_PRIMARY := Color("#2e6fce") # main action blue
6+
const COLOR_PRIMARY_LIGHT := Color("#3e84f5")
7+
const COLOR_PRIMARY_DARK := Color("#2459a8")
8+
const COLOR_ACCENT := Color("#54a3ff")
9+
const COLOR_ACCENT_LIGHT := Color("#6bb2ff")
10+
511
@export var joystick_radius := 140.0
612
@export var joystick_handle_radius := 52.0
713
@export var joystick_deadzone := 0.12
@@ -62,16 +68,16 @@ func _should_show_controls() -> bool:
6268

6369
func _initialize_buttons() -> void:
6470
buttons.clear()
65-
buttons["harpoon"] = _make_button("throw", "action", "Harpoon", action_button_size, Color(0.18, 0.54, 0.95, 0.85))
66-
buttons["shoot"] = _make_button("shoot", "action", "Gun", action_button_size * 0.9, Color(0.95, 0.32, 0.32, 0.85), GameState.Upgrade.AK47)
67-
buttons["pickaxe"] = _make_button("swing_pickaxe", "action", "Pick", action_button_size * 0.85, Color(0.50, 0.78, 0.44, 0.85), GameState.Upgrade.PICKAXE_UNLOCKED, 0.0, true)
71+
buttons["harpoon"] = _make_button("throw", "action", "Harpoon", action_button_size, COLOR_PRIMARY_LIGHT)
72+
buttons["shoot"] = _make_button("shoot", "action", "Gun", action_button_size * 0.9, COLOR_PRIMARY, GameState.Upgrade.AK47)
73+
buttons["pickaxe"] = _make_button("swing_pickaxe", "action", "Pick", action_button_size * 0.85, COLOR_PRIMARY_DARK, GameState.Upgrade.PICKAXE_UNLOCKED, 0.0, true)
6874

69-
buttons["buoy"] = _make_button("upgrade_surface_buoy", "ability", "Buoy", ability_button_size, Color(0.96, 0.77, 0.31, 0.85), GameState.Upgrade.SURFACE_BUOY, 0.0, true)
70-
buttons["drone"] = _make_button("upgrade_drone_selling", "ability", "Drone", ability_button_size, Color(0.88, 0.52, 0.78, 0.85), GameState.Upgrade.DRONE_SELLING, hold_threshold_default, true)
71-
buttons["save"] = _make_button("inventory_save", "ability", "Save", ability_button_size, Color(0.43, 0.72, 0.89, 0.85), GameState.Upgrade.INVENTORY_SAVE, hold_threshold_default, true)
75+
buttons["buoy"] = _make_button("upgrade_surface_buoy", "ability", "Buoy", ability_button_size, COLOR_ACCENT, GameState.Upgrade.SURFACE_BUOY, 0.0, true)
76+
buttons["drone"] = _make_button("upgrade_drone_selling", "ability", "Drone", ability_button_size, COLOR_ACCENT_LIGHT, GameState.Upgrade.DRONE_SELLING, hold_threshold_default, true)
77+
buttons["save"] = _make_button("inventory_save", "ability", "Save", ability_button_size, COLOR_PRIMARY_LIGHT, GameState.Upgrade.INVENTORY_SAVE, hold_threshold_default, true)
7278

73-
buttons["inventory"] = _make_button("inv_toggle", "utility", "Inventory", utility_button_size, Color(0.29, 0.82, 0.74, 0.85), -1, 0.0, true)
74-
buttons["pause"] = _make_button("esc", "utility", "Pause", utility_button_size * Vector2(0.85, 0.85), Color(0.78, 0.78, 0.82, 0.85), -1, 0.0, true)
79+
buttons["inventory"] = _make_button("inv_toggle", "utility", "Inventory", utility_button_size, COLOR_PRIMARY, -1, 0.0, true)
80+
buttons["pause"] = _make_button("esc", "utility", "Pause", utility_button_size * Vector2(0.85, 0.85), COLOR_PRIMARY_DARK, -1, 0.0, true)
7581

7682
func _make_button(action: String, group: String, label: String, size: Vector2, color: Color, requires_upgrade: int = -1, hold_threshold: float = 0.0, auto_release: bool = false) -> Dictionary:
7783
return {
@@ -277,6 +283,8 @@ func _is_button_available(name: String) -> bool:
277283
if not buttons.has(name):
278284
return false
279285
var data: Dictionary = buttons[name]
286+
if name == "drone" and GameState.is_intro():
287+
return false
280288
if data.requires_upgrade != -1:
281289
if not GameState.upgrades.has(data.requires_upgrade):
282290
return false
@@ -380,11 +388,7 @@ func _draw():
380388
if data.pressed:
381389
fill_color = fill_color.lightened(0.12)
382390
draw_circle(center, radius, fill_color)
383-
draw_arc(center, radius, 0.0, TAU, 48, fill_color.darkened(0.35), 4.5)
384-
if data.hold_threshold > 0.0 and data.pressed:
385-
var ratio: float = clamp(data.hold_elapsed / data.hold_threshold, 0.0, 1.0)
386-
if ratio > 0.0:
387-
draw_arc(center, radius + 6.0, -PI / 2.0, -PI / 2.0 + TAU * ratio, 64, fill_color.lightened(0.25), 6.0)
391+
draw_arc(center, radius, 0.0, TAU, 48, fill_color.darkened(0.25), 4.5)
388392
if font:
389393
var text: String = data.label
390394
var text_size: Vector2 = font.get_string_size(text, HORIZONTAL_ALIGNMENT_LEFT, -1, font_size)

0 commit comments

Comments
 (0)