Add readability frame capture tool

This commit is contained in:
2026-06-20 18:59:18 +09:00
parent 32bb010d2f
commit 4948ed6084
4 changed files with 220 additions and 3 deletions

View File

@@ -298,6 +298,7 @@ const UI_TOOLTIP_FONT_SIZE := 16
const UI_TOOLTIP_OUTLINE_SIZE := 3
const MAP_SCROLL_FRAME_PADDING := 12.0
const SPEAKER_DISPLAY_NAMES := {
"Narrator": "이야기",
"Cao Cao": "조조",
"Xiahou Dun": "하후돈",
"Xiahou Yuan": "하후연",
@@ -348,6 +349,8 @@ const SPEAKER_DISPLAY_NAMES := {
"Scout": "척후"
}
const SPEAKER_CANONICAL_NAMES := {
"이야기": "Narrator",
"기록": "Narrator",
"조조": "Cao Cao",
"하후돈": "Xiahou Dun",
"하후연": "Xiahou Yuan",
@@ -12595,9 +12598,7 @@ func _update_dialogue_portrait(speaker: String, portrait_path: String) -> void:
return
var texture := _load_portrait_texture(portrait_path)
var has_portrait := texture != null
var placeholder_text := _dialogue_portrait_initials(speaker)
if placeholder_text.is_empty():
placeholder_text = "기록"
var placeholder_text := _dialogue_portrait_placeholder_text(speaker)
dialogue_portrait_panel.visible = true
dialogue_portrait_texture.texture = texture
dialogue_portrait_texture.visible = has_portrait
@@ -12650,6 +12651,16 @@ func _load_portrait_texture(portrait_path: String) -> Texture2D:
return raw_texture
func _dialogue_portrait_placeholder_text(speaker: String) -> String:
var normalized_speaker := speaker.strip_edges()
if normalized_speaker.is_empty():
return "기록"
if _canonical_speaker_name(normalized_speaker) == "Narrator":
return "기록"
var initials := _dialogue_portrait_initials(normalized_speaker)
return "기록" if initials.is_empty() else initials
func _dialogue_portrait_initials(speaker: String) -> String:
var normalized_speaker := speaker.strip_edges()
if normalized_speaker.is_empty():