From 548b519d4454d0eaaa83ced4d0b9b14c2a5c8767 Mon Sep 17 00:00:00 2001 From: hz Date: Sun, 26 Jul 2026 18:08:20 -0500 Subject: [PATCH 1/2] Vertically center the login screen wordmark against the logo The RanaZe/STEP 3 TRAINER text block was top-aligned inside the brand row's HBoxContainer, which is taller than the text due to the 190x190 icon beside it, so it hugged the top instead of centering against the shield mark. Co-Authored-By: Claude Sonnet 5 --- scripts/ui/login_screen.gd | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/ui/login_screen.gd b/scripts/ui/login_screen.gd index 6d26195..a1e9493 100644 --- a/scripts/ui/login_screen.gd +++ b/scripts/ui/login_screen.gd @@ -151,6 +151,7 @@ func _build_ui() -> void: large_icon.stretch_mode = TextureRect.STRETCH_KEEP_ASPECT_CENTERED brand_row.add_child(large_icon) var wordmark := VBoxContainer.new() + wordmark.size_flags_vertical = Control.SIZE_SHRINK_CENTER wordmark.add_theme_constant_override("separation", 4) brand_row.add_child(wordmark) var name_row := HBoxContainer.new() From 23d573e221653f79891787ab6025b956b1c3ed01 Mon Sep 17 00:00:00 2001 From: hz Date: Sun, 26 Jul 2026 18:28:55 -0500 Subject: [PATCH 2/2] Fix GDScript ternary and shadowed-identifier warnings in dashboard scripts Godot's static checker can't unify a float branch with a null branch in a ternary, so point_value() now uses explicit if/return; renaming the local sign variable to sign_prefix avoids shadowing the builtin sign(). --- scripts/ui/dashboard_chart.gd | 8 ++++++-- scripts/ui/dashboard_screen.gd | 8 ++++---- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/scripts/ui/dashboard_chart.gd b/scripts/ui/dashboard_chart.gd index 849a7bd..68e4f6f 100644 --- a/scripts/ui/dashboard_chart.gd +++ b/scripts/ui/dashboard_chart.gd @@ -99,9 +99,13 @@ func _draw() -> void: static func point_value(point: Dictionary, series_mode: String) -> Variant: if series_mode == "accuracy": - return float(point.get("accuracy", 0)) if int(point.get("total", 0)) > 0 else null + if int(point.get("total", 0)) > 0: + return float(point.get("accuracy", 0)) + return null var value: Variant = point.get("questionBankRating", null) - return null if value == null else float(value) + if value == null: + return null + return float(value) static func axis_bounds(series_points: Array, series_mode: String) -> Vector2: diff --git a/scripts/ui/dashboard_screen.gd b/scripts/ui/dashboard_screen.gd index 0771a3d..a97ba79 100644 --- a/scripts/ui/dashboard_screen.gd +++ b/scripts/ui/dashboard_screen.gd @@ -229,8 +229,8 @@ func _render_rating_card(key: String, sparkline: Control, accent: Color, rating_ if delta_value != null: var delta := int(delta_value) var arrow := "↗" if delta >= 0 else "↘" - var sign := "+" if delta >= 0 else "" - trend_text = "%s %s%d this week" % [arrow, sign, delta] + var sign_prefix := "+" if delta >= 0 else "" + trend_text = "%s %s%d this week" % [arrow, sign_prefix, delta] trend_color = Brand.SUCCESS if delta >= 0 else Brand.MAGENTA if percentile_value != null: caption = "Top %d%% of users" % int(percentile_value) @@ -269,8 +269,8 @@ func _render_accuracy_card(data: Dictionary) -> void: if delta_value != null: var delta := int(delta_value) var arrow := "↗" if delta >= 0 else "↘" - var sign := "+" if delta >= 0 else "" - trend_text = "%s %s%d%% vs last 100" % [arrow, sign, delta] + var sign_prefix := "+" if delta >= 0 else "" + trend_text = "%s %s%d%% vs last 100" % [arrow, sign_prefix, delta] trend_color = Brand.SUCCESS if delta >= 0 else Brand.MAGENTA _set_stat_card("accuracy", "%d%%" % accuracy, trend_text, trend_color, "Last %d questions" % int(data.get("accuracySampleSize", 0))) accuracy_progress_bar.value = accuracy