feat(ui): theme HUD with Orbitron typography

This commit is contained in:
Josh Creek
2026-08-07 22:48:56 +01:00
parent 8bd65290fc
commit 0a7eb0b742
10 changed files with 173 additions and 5 deletions
+1 -1
View File
@@ -73,7 +73,7 @@ func _draw() -> void:
draw_line(Vector2(-half_chord, horizon_y), Vector2(half_chord, horizon_y), LINE_COLOR, 2.0)
# Pitch ladder: rungs every 10 degrees, labelled, scrolling with pitch.
var font := ThemeDB.fallback_font
var font := hud_font()
for ladder_deg: int in [-30, -20, -10, 10, 20, 30]:
var y := horizon_y - ladder_deg * px_per_deg
if absf(y) > radius - 12.0:
+1 -1
View File
@@ -37,7 +37,7 @@ func _process(delta: float) -> void:
func _draw() -> void:
var font := ThemeDB.fallback_font
var font := hud_font()
var fraction := clampf(_value / max_value, 0.0, 1.0)
var reading := value_format % _value
+1 -1
View File
@@ -39,7 +39,7 @@ func _process(delta: float) -> void:
func _draw() -> void:
var font := ThemeDB.fallback_font
var font := hud_font()
var center_x := size.x / 2.0
var px_per_deg := size.x / VISIBLE_RANGE
+8
View File
@@ -23,3 +23,11 @@ static func angle_delta_deg(from: float, to: float) -> float:
func _smoothing_weight(delta: float) -> float:
return 1.0 - exp(-SMOOTHING * delta) # frame-rate independent
# Procedural draw calls do not automatically consume a Control's theme font;
# resolve it explicitly so every instrument uses the same packaged typeface
# as ordinary Labels instead of ThemeDB's debug-looking fallback.
func hud_font() -> Font:
var font := get_theme_default_font()
return font if font else ThemeDB.fallback_font