Add generated icons to title menu buttons
This commit is contained in:
@@ -1145,6 +1145,25 @@ func _configure_top_tool_button(button: Button, node_name: String, icon_kind: St
|
||||
button.add_theme_font_size_override("font_size", 1)
|
||||
|
||||
|
||||
func _configure_title_menu_button(button: Button, node_name: String, icon_kind: String, label: String, tooltip: String, minimum_size: Vector2, important: bool = false) -> void:
|
||||
if button == null:
|
||||
return
|
||||
button.name = node_name
|
||||
button.text = label
|
||||
button.tooltip_text = tooltip
|
||||
button.custom_minimum_size = minimum_size
|
||||
button.icon = _make_toolbar_icon(icon_kind)
|
||||
button.expand_icon = false
|
||||
button.icon_alignment = HORIZONTAL_ALIGNMENT_LEFT
|
||||
button.vertical_icon_alignment = VERTICAL_ALIGNMENT_CENTER
|
||||
button.alignment = HORIZONTAL_ALIGNMENT_CENTER
|
||||
button.add_theme_constant_override("h_separation", 12)
|
||||
button.add_theme_font_size_override("font_size", 16 if important else 14)
|
||||
button.set_meta("title_menu_button", true)
|
||||
button.set_meta("command_icon", icon_kind)
|
||||
button.set_meta("command_label", label)
|
||||
|
||||
|
||||
func _configure_prep_menu_button(button: Button, node_name: String, icon_kind: String, label: String, hint: String) -> void:
|
||||
if button == null:
|
||||
return
|
||||
@@ -4100,23 +4119,39 @@ func _create_hud() -> void:
|
||||
title_menu_column.add_child(title_status_label)
|
||||
|
||||
title_start_button = Button.new()
|
||||
title_start_button.text = "처음부터 시작"
|
||||
title_start_button.custom_minimum_size = Vector2(462, 44)
|
||||
title_start_button.tooltip_text = "새 전기를 열고 첫 전장부터 시작합니다."
|
||||
_configure_title_menu_button(
|
||||
title_start_button,
|
||||
"TitleStartButton",
|
||||
"new",
|
||||
"처음부터 시작",
|
||||
"새 전기를 열고 첫 전장부터 시작합니다.",
|
||||
Vector2(462, 46),
|
||||
true
|
||||
)
|
||||
title_start_button.pressed.connect(_on_title_start_pressed)
|
||||
title_menu_column.add_child(title_start_button)
|
||||
|
||||
title_load_button = Button.new()
|
||||
title_load_button.text = "게임 로드"
|
||||
title_load_button.custom_minimum_size = Vector2(462, 44)
|
||||
title_load_button.tooltip_text = "저장된 전기를 불러옵니다."
|
||||
_configure_title_menu_button(
|
||||
title_load_button,
|
||||
"TitleLoadButton",
|
||||
"load",
|
||||
"게임 로드",
|
||||
"저장된 전기를 불러옵니다.",
|
||||
Vector2(462, 46)
|
||||
)
|
||||
title_load_button.pressed.connect(_on_title_load_pressed)
|
||||
title_menu_column.add_child(title_load_button)
|
||||
|
||||
title_settings_button = Button.new()
|
||||
title_settings_button.text = "환경 설정"
|
||||
title_settings_button.custom_minimum_size = Vector2(462, 44)
|
||||
title_settings_button.tooltip_text = "소리와 전장 조작 옵션을 바꿉니다."
|
||||
_configure_title_menu_button(
|
||||
title_settings_button,
|
||||
"TitleSettingsButton",
|
||||
"settings",
|
||||
"환경 설정",
|
||||
"소리와 전장 조작 옵션을 바꿉니다.",
|
||||
Vector2(462, 46)
|
||||
)
|
||||
title_settings_button.pressed.connect(_on_title_settings_pressed)
|
||||
title_menu_column.add_child(title_settings_button)
|
||||
|
||||
@@ -4139,21 +4174,38 @@ func _create_hud() -> void:
|
||||
title_load_column.add_child(title_load_caption)
|
||||
|
||||
title_load_auto_button = Button.new()
|
||||
title_load_auto_button.custom_minimum_size = Vector2(422, 38)
|
||||
title_load_auto_button.tooltip_text = "자동으로 봉인된 진행 기록을 엽니다."
|
||||
_configure_title_menu_button(
|
||||
title_load_auto_button,
|
||||
"TitleLoadAutoButton",
|
||||
"campaign",
|
||||
"자동 기록 없음",
|
||||
"자동으로 봉인된 진행 기록을 엽니다.",
|
||||
Vector2(422, 38)
|
||||
)
|
||||
title_load_auto_button.pressed.connect(_on_title_load_auto_pressed)
|
||||
title_load_column.add_child(title_load_auto_button)
|
||||
|
||||
title_load_manual_button = Button.new()
|
||||
title_load_manual_button.custom_minimum_size = Vector2(422, 38)
|
||||
title_load_manual_button.tooltip_text = "군막에서 직접 남긴 수동 봉인을 엽니다."
|
||||
_configure_title_menu_button(
|
||||
title_load_manual_button,
|
||||
"TitleLoadManualButton",
|
||||
"save",
|
||||
"수동 봉인 없음",
|
||||
"군막에서 직접 남긴 수동 봉인을 엽니다.",
|
||||
Vector2(422, 38)
|
||||
)
|
||||
title_load_manual_button.pressed.connect(_on_title_load_manual_pressed)
|
||||
title_load_column.add_child(title_load_manual_button)
|
||||
|
||||
title_load_back_button = Button.new()
|
||||
title_load_back_button.text = "뒤로"
|
||||
title_load_back_button.custom_minimum_size = Vector2(422, 34)
|
||||
title_load_back_button.tooltip_text = "처음 화면 선택으로 돌아갑니다."
|
||||
_configure_title_menu_button(
|
||||
title_load_back_button,
|
||||
"TitleLoadBackButton",
|
||||
"cancel",
|
||||
"뒤로",
|
||||
"처음 화면 선택으로 돌아갑니다.",
|
||||
Vector2(422, 34)
|
||||
)
|
||||
title_load_back_button.pressed.connect(_on_title_load_back_pressed)
|
||||
title_load_column.add_child(title_load_back_button)
|
||||
|
||||
@@ -4252,9 +4304,14 @@ func _create_hud() -> void:
|
||||
title_sfx_volume_row.add_child(title_sfx_volume_value_label)
|
||||
|
||||
title_audio_reset_button = Button.new()
|
||||
title_audio_reset_button.text = "소리 켜기"
|
||||
title_audio_reset_button.custom_minimum_size = Vector2(422, 32)
|
||||
title_audio_reset_button.tooltip_text = "배경음과 효과음을 켜고 음량을 기본값으로 되돌린 뒤 확인음을 재생합니다."
|
||||
_configure_title_menu_button(
|
||||
title_audio_reset_button,
|
||||
"TitleAudioResetButton",
|
||||
"status",
|
||||
"소리 켜기",
|
||||
"배경음과 효과음을 켜고 음량을 기본값으로 되돌린 뒤 확인음을 재생합니다.",
|
||||
Vector2(422, 32)
|
||||
)
|
||||
title_audio_reset_button.pressed.connect(_on_title_audio_reset_pressed)
|
||||
title_settings_column.add_child(title_audio_reset_button)
|
||||
|
||||
@@ -4267,9 +4324,14 @@ func _create_hud() -> void:
|
||||
title_settings_column.add_child(title_edge_scroll_toggle)
|
||||
|
||||
title_settings_back_button = Button.new()
|
||||
title_settings_back_button.text = "설정 닫기"
|
||||
title_settings_back_button.custom_minimum_size = Vector2(462, 34)
|
||||
title_settings_back_button.tooltip_text = "환경 설정을 접습니다."
|
||||
_configure_title_menu_button(
|
||||
title_settings_back_button,
|
||||
"TitleSettingsBackButton",
|
||||
"cancel",
|
||||
"설정 닫기",
|
||||
"환경 설정을 접습니다.",
|
||||
Vector2(462, 34)
|
||||
)
|
||||
title_settings_back_button.pressed.connect(_on_title_settings_back_pressed)
|
||||
title_menu_column.add_child(title_settings_back_button)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user