fix: prove title timing and compact journal readability
This commit is contained in:
+12
-1
@@ -317,6 +317,7 @@ func _get_capture_mode() -> String:
|
||||
func _capture_visual_check(capture_mode: String) -> void:
|
||||
if capture_mode == "exit":
|
||||
_prepare_exit_capture_state()
|
||||
_refresh_capture_hud()
|
||||
# Camera2D applies its scroll during the frame cycle. Force it before the
|
||||
# deterministic capture so the world is framed around the capture state.
|
||||
camera.force_update_scroll()
|
||||
@@ -334,6 +335,11 @@ func _capture_visual_check(capture_mode: String) -> void:
|
||||
var result := image.save_png(capture_path)
|
||||
get_tree().quit(0 if result == OK else 1)
|
||||
|
||||
func _refresh_capture_hud() -> void:
|
||||
# Capture startup appends game_started after the normal first HUD refresh.
|
||||
# Refresh only on the capture path so production rendering remains untouched.
|
||||
hud.refresh(game_state, run_state.recent_events(run_state.log.size()), run_state)
|
||||
|
||||
func _prepare_exit_capture_state() -> void:
|
||||
# Preserve the entrance exploration, then frame the authored surface exit.
|
||||
# This exercises visible, explored, and unknown rendering without depending
|
||||
@@ -1895,9 +1901,14 @@ func _refresh_title() -> void:
|
||||
var previous_title_id := run_state.current_title_id
|
||||
var current_title_id := StringName(title.get("id", ""))
|
||||
run_state.current_title_id = current_title_id
|
||||
if title.is_empty():
|
||||
# A title loss is not an announcement; it must also clear a still-visible
|
||||
# notification from the prior title.
|
||||
_hide_title_notification()
|
||||
return
|
||||
# Boot and load establish the state silently. Only a real later transition
|
||||
# deserves the temporary overlay; the permanent top bar belongs to GameHud.
|
||||
if _title_notifications_enabled and current_title_id != previous_title_id and not title.is_empty():
|
||||
if _title_notifications_enabled and current_title_id != previous_title_id:
|
||||
title_notification_label.text = String(title.get("name", current_title_id))
|
||||
title_notification_label.visible = true
|
||||
title_notification_timer.start()
|
||||
|
||||
@@ -175,7 +175,6 @@ func _apply_text_scale(layout_scale: float) -> void:
|
||||
$EnemyHealthLabel,
|
||||
$CombatSummaryLabel,
|
||||
$DeadlineLabel,
|
||||
$EventLog,
|
||||
action_hint_label,
|
||||
$ContextPromptLabel,
|
||||
$HelpLabel,
|
||||
@@ -186,6 +185,14 @@ func _apply_text_scale(layout_scale: float) -> void:
|
||||
control.set_meta(&"base_font_size", base_size)
|
||||
control.add_theme_font_size_override(&"font_size", roundi(base_size * font_scale))
|
||||
|
||||
# RichTextLabel does not use Label's font_size theme key. Keep the journal
|
||||
# independently readable at 720p without changing the rest of the HUD scale.
|
||||
var event_log_base_size: int = event_log.get_meta(&"base_normal_font_size", 0)
|
||||
if event_log_base_size == 0:
|
||||
event_log_base_size = event_log.get_theme_font_size(&"normal_font_size")
|
||||
event_log.set_meta(&"base_normal_font_size", event_log_base_size)
|
||||
event_log.add_theme_font_size_override(&"normal_font_size", max(12, roundi(event_log_base_size * font_scale)))
|
||||
|
||||
func _layout_expanded_log(origin: Vector2, scale: float) -> void:
|
||||
# Explicit expansion may temporarily consume the MapSection, never the world.
|
||||
_set_rect(log_panel, origin + Vector2(1456, 110) * scale, Vector2(436, 818) * scale)
|
||||
|
||||
Reference in New Issue
Block a user