increase hud text
This commit is contained in:
+17
-22
@@ -615,23 +615,18 @@ func _create_ui() -> void:
|
|||||||
_make_win_panel()
|
_make_win_panel()
|
||||||
|
|
||||||
func _make_hud() -> void:
|
func _make_hud() -> void:
|
||||||
# Score
|
score_label = _label(Vector2(16, 12), "Score: 0", 30)
|
||||||
score_label = _label(Vector2(12, 10), "Score: 0", 22)
|
wave_label = _label(Vector2(16, 50), "Wave: 1", 30)
|
||||||
# Wave
|
|
||||||
wave_label = _label(Vector2(12, 38), "Wave: 1", 22)
|
|
||||||
|
|
||||||
# HP bar
|
_label(Vector2(16, 92), "HP", 20)
|
||||||
_label(Vector2(12, 68), "HP", 16)
|
hp_bar_bg = _crect(Vector2(16, 118), Vector2(260, 20), Color(0.25, 0.04, 0.04))
|
||||||
hp_bar_bg = _crect(Vector2(12, 88), Vector2(200, 16), Color(0.25, 0.04, 0.04))
|
hp_bar = _crect(Vector2(16, 118), Vector2(260, 20), Color(0.9, 0.15, 0.15))
|
||||||
hp_bar = _crect(Vector2(12, 88), Vector2(200, 16), Color(0.9, 0.15, 0.15))
|
|
||||||
|
|
||||||
# Kill progress toward next upgrade
|
_label(Vector2(16, 146), "Next upgrade", 20)
|
||||||
_label(Vector2(12, 110), "Next upgrade", 16)
|
progress_bg = _crect(Vector2(16, 172), Vector2(260, 14), Color(0.1, 0.1, 0.25))
|
||||||
progress_bg = _crect(Vector2(12, 130), Vector2(200, 10), Color(0.1, 0.1, 0.25))
|
progress_bar = _crect(Vector2(16, 172), Vector2(0, 14), Color(0.4, 0.8, 1.0))
|
||||||
progress_bar = _crect(Vector2(12, 130), Vector2(0, 10), Color(0.4, 0.8, 1.0))
|
|
||||||
|
|
||||||
# Tier display
|
tier_label = _label(Vector2(16, 194), "", 20)
|
||||||
tier_label = _label(Vector2(12, 148), "", 17)
|
|
||||||
|
|
||||||
_make_equipment_slots()
|
_make_equipment_slots()
|
||||||
|
|
||||||
@@ -795,11 +790,11 @@ func _make_win_panel() -> void:
|
|||||||
|
|
||||||
# ─── Equipment slots ──────────────────────────────────────────────────────────
|
# ─── Equipment slots ──────────────────────────────────────────────────────────
|
||||||
|
|
||||||
const _EQUIP_SLOT_SIZE := 54
|
const _EQUIP_SLOT_SIZE := 64
|
||||||
const _EQUIP_SLOT_GAP := 8
|
const _EQUIP_SLOT_GAP := 10
|
||||||
const _EQUIP_SLOT_PAD := 3
|
const _EQUIP_SLOT_PAD := 3
|
||||||
const _EQUIP_START_X := 12
|
const _EQUIP_START_X := 16
|
||||||
const _EQUIP_START_Y := 170
|
const _EQUIP_START_Y := 228
|
||||||
const _EQUIP_EMPTY_COL := Color(0.10, 0.10, 0.16)
|
const _EQUIP_EMPTY_COL := Color(0.10, 0.10, 0.16)
|
||||||
const _EQUIP_BORDER_COL := Color(0.30, 0.30, 0.42)
|
const _EQUIP_BORDER_COL := Color(0.30, 0.30, 0.42)
|
||||||
|
|
||||||
@@ -829,18 +824,18 @@ func _make_equipment_slots() -> void:
|
|||||||
var x := _EQUIP_START_X + i * (_EQUIP_SLOT_SIZE + _EQUIP_SLOT_GAP)
|
var x := _EQUIP_START_X + i * (_EQUIP_SLOT_SIZE + _EQUIP_SLOT_GAP)
|
||||||
var y := _EQUIP_START_Y
|
var y := _EQUIP_START_Y
|
||||||
|
|
||||||
var title := _label(Vector2(x, y), titles[i], 12)
|
var title := _label(Vector2(x, y), titles[i], 16)
|
||||||
title.size.x = _EQUIP_SLOT_SIZE
|
title.size.x = _EQUIP_SLOT_SIZE
|
||||||
title.horizontal_alignment = HORIZONTAL_ALIGNMENT_CENTER
|
title.horizontal_alignment = HORIZONTAL_ALIGNMENT_CENTER
|
||||||
|
|
||||||
var border := ColorRect.new()
|
var border := ColorRect.new()
|
||||||
border.position = Vector2(x, y + 16)
|
border.position = Vector2(x, y + 22)
|
||||||
border.size = Vector2(_EQUIP_SLOT_SIZE, _EQUIP_SLOT_SIZE)
|
border.size = Vector2(_EQUIP_SLOT_SIZE, _EQUIP_SLOT_SIZE)
|
||||||
border.color = _EQUIP_BORDER_COL
|
border.color = _EQUIP_BORDER_COL
|
||||||
canvas.add_child(border)
|
canvas.add_child(border)
|
||||||
|
|
||||||
var fill := ColorRect.new()
|
var fill := ColorRect.new()
|
||||||
fill.position = Vector2(x + _EQUIP_SLOT_PAD, y + 16 + _EQUIP_SLOT_PAD)
|
fill.position = Vector2(x + _EQUIP_SLOT_PAD, y + 22 + _EQUIP_SLOT_PAD)
|
||||||
fill.size = Vector2(_EQUIP_SLOT_SIZE - _EQUIP_SLOT_PAD * 2, _EQUIP_SLOT_SIZE - _EQUIP_SLOT_PAD * 2)
|
fill.size = Vector2(_EQUIP_SLOT_SIZE - _EQUIP_SLOT_PAD * 2, _EQUIP_SLOT_SIZE - _EQUIP_SLOT_PAD * 2)
|
||||||
fill.color = _EQUIP_EMPTY_COL
|
fill.color = _EQUIP_EMPTY_COL
|
||||||
canvas.add_child(fill)
|
canvas.add_child(fill)
|
||||||
@@ -850,7 +845,7 @@ func _make_equipment_slots() -> void:
|
|||||||
lbl.position = fill.position
|
lbl.position = fill.position
|
||||||
lbl.size = fill.size
|
lbl.size = fill.size
|
||||||
lbl.text = ""
|
lbl.text = ""
|
||||||
lbl.add_theme_font_size_override("font_size", 11)
|
lbl.add_theme_font_size_override("font_size", 14)
|
||||||
lbl.add_theme_color_override("font_color", Color.WHITE)
|
lbl.add_theme_color_override("font_color", Color.WHITE)
|
||||||
lbl.add_theme_color_override("font_shadow_color", Color(0, 0, 0, 0.85))
|
lbl.add_theme_color_override("font_shadow_color", Color(0, 0, 0, 0.85))
|
||||||
lbl.add_theme_constant_override("shadow_offset_x", 1)
|
lbl.add_theme_constant_override("shadow_offset_x", 1)
|
||||||
|
|||||||
Reference in New Issue
Block a user