Compact battle command notice
This commit is contained in:
@@ -167,6 +167,10 @@ const BRIEFING_VISIBLE_BODY_CHARS := 50
|
|||||||
const COMMAND_NOTICE_VISIBLE_BODY_LINES := 2
|
const COMMAND_NOTICE_VISIBLE_BODY_LINES := 2
|
||||||
const BATTLE_START_NOTICE_VISIBLE_BODY_LINES := 3
|
const BATTLE_START_NOTICE_VISIBLE_BODY_LINES := 3
|
||||||
const COMMAND_NOTICE_VISIBLE_BODY_CHARS := 34
|
const COMMAND_NOTICE_VISIBLE_BODY_CHARS := 34
|
||||||
|
const COMMAND_NOTICE_PANEL_POSITION := Vector2(198, 108)
|
||||||
|
const COMMAND_NOTICE_PANEL_SIZE := Vector2(492, 142)
|
||||||
|
const COMMAND_NOTICE_CONTENT_WIDTH := 444.0
|
||||||
|
const COMMAND_NOTICE_LABEL_SIZE := Vector2(444, 76)
|
||||||
const DIALOGUE_SPEAKER_FONT_SIZE := 20
|
const DIALOGUE_SPEAKER_FONT_SIZE := 20
|
||||||
const DIALOGUE_SPEAKER_MIN_FONT_SIZE := 16
|
const DIALOGUE_SPEAKER_MIN_FONT_SIZE := 16
|
||||||
const DIALOGUE_TEXT_FONT_SIZE := 20
|
const DIALOGUE_TEXT_FONT_SIZE := 20
|
||||||
@@ -198,7 +202,7 @@ const TITLE_MENU_BOARD_SIZE := Vector2(520, 650)
|
|||||||
const TITLE_MENU_PANEL_SIZE := Vector2(462, 536)
|
const TITLE_MENU_PANEL_SIZE := Vector2(462, 536)
|
||||||
const OPENING_STORY_PROGRESS_LEDGER_SIZE := Vector2(326, 48)
|
const OPENING_STORY_PROGRESS_LEDGER_SIZE := Vector2(326, 48)
|
||||||
const OPENING_STORY_PROGRESS_SEAL_SIZE := Vector2(34, 34)
|
const OPENING_STORY_PROGRESS_SEAL_SIZE := Vector2(34, 34)
|
||||||
const COMMAND_NOTICE_ICON_SIZE := Vector2(32, 32)
|
const COMMAND_NOTICE_ICON_SIZE := Vector2(28, 28)
|
||||||
const COMMAND_NOTICE_MAX_ICONS := 5
|
const COMMAND_NOTICE_MAX_ICONS := 5
|
||||||
const COMBAT_RESULT_PANEL_POSITION := Vector2(158, 536)
|
const COMBAT_RESULT_PANEL_POSITION := Vector2(158, 536)
|
||||||
const COMBAT_RESULT_PANEL_SIZE := Vector2(396, 164)
|
const COMBAT_RESULT_PANEL_SIZE := Vector2(396, 164)
|
||||||
@@ -3718,25 +3722,23 @@ func _create_hud() -> void:
|
|||||||
|
|
||||||
objective_notice_panel = PanelContainer.new()
|
objective_notice_panel = PanelContainer.new()
|
||||||
objective_notice_panel.visible = false
|
objective_notice_panel.visible = false
|
||||||
objective_notice_panel.position = Vector2(126, 92)
|
objective_notice_panel.position = COMMAND_NOTICE_PANEL_POSITION
|
||||||
objective_notice_panel.size = Vector2(604, 232)
|
objective_notice_panel.size = COMMAND_NOTICE_PANEL_SIZE
|
||||||
objective_notice_panel.custom_minimum_size = Vector2(604, 232)
|
objective_notice_panel.custom_minimum_size = COMMAND_NOTICE_PANEL_SIZE
|
||||||
objective_notice_panel.mouse_filter = Control.MOUSE_FILTER_PASS
|
objective_notice_panel.mouse_filter = Control.MOUSE_FILTER_PASS
|
||||||
objective_notice_panel.z_as_relative = false
|
objective_notice_panel.z_as_relative = false
|
||||||
objective_notice_panel.z_index = 72
|
objective_notice_panel.z_index = 72
|
||||||
_apply_panel_style(objective_notice_panel, "notice_edict")
|
_apply_panel_style(objective_notice_panel, "hud_readable")
|
||||||
root.add_child(objective_notice_panel)
|
root.add_child(objective_notice_panel)
|
||||||
|
|
||||||
var objective_notice_column := VBoxContainer.new()
|
var objective_notice_column := VBoxContainer.new()
|
||||||
objective_notice_column.add_theme_constant_override("separation", 5)
|
objective_notice_column.add_theme_constant_override("separation", 5)
|
||||||
objective_notice_panel.add_child(objective_notice_column)
|
objective_notice_panel.add_child(objective_notice_column)
|
||||||
objective_notice_column.add_child(_make_scroll_rod(548, 4))
|
|
||||||
objective_notice_column.add_child(_make_seal_ribbon(548, 14))
|
|
||||||
|
|
||||||
objective_notice_icon_strip = HBoxContainer.new()
|
objective_notice_icon_strip = HBoxContainer.new()
|
||||||
objective_notice_icon_strip.name = "CommandNoticeIconStrip"
|
objective_notice_icon_strip.name = "CommandNoticeIconStrip"
|
||||||
objective_notice_icon_strip.alignment = BoxContainer.ALIGNMENT_CENTER
|
objective_notice_icon_strip.alignment = BoxContainer.ALIGNMENT_CENTER
|
||||||
objective_notice_icon_strip.custom_minimum_size = Vector2(548, 32)
|
objective_notice_icon_strip.custom_minimum_size = Vector2(COMMAND_NOTICE_CONTENT_WIDTH, COMMAND_NOTICE_ICON_SIZE.y)
|
||||||
objective_notice_icon_strip.mouse_filter = Control.MOUSE_FILTER_PASS
|
objective_notice_icon_strip.mouse_filter = Control.MOUSE_FILTER_PASS
|
||||||
objective_notice_icon_strip.add_theme_constant_override("separation", 8)
|
objective_notice_icon_strip.add_theme_constant_override("separation", 8)
|
||||||
objective_notice_column.add_child(objective_notice_icon_strip)
|
objective_notice_column.add_child(objective_notice_icon_strip)
|
||||||
@@ -3745,10 +3747,9 @@ func _create_hud() -> void:
|
|||||||
objective_notice_label.horizontal_alignment = HORIZONTAL_ALIGNMENT_CENTER
|
objective_notice_label.horizontal_alignment = HORIZONTAL_ALIGNMENT_CENTER
|
||||||
objective_notice_label.vertical_alignment = VERTICAL_ALIGNMENT_CENTER
|
objective_notice_label.vertical_alignment = VERTICAL_ALIGNMENT_CENTER
|
||||||
objective_notice_label.autowrap_mode = TextServer.AUTOWRAP_WORD_SMART
|
objective_notice_label.autowrap_mode = TextServer.AUTOWRAP_WORD_SMART
|
||||||
objective_notice_label.custom_minimum_size = Vector2(548, 116)
|
objective_notice_label.custom_minimum_size = COMMAND_NOTICE_LABEL_SIZE
|
||||||
_apply_label_style(objective_notice_label, UI_AGED_INK, OBJECTIVE_NOTICE_FONT_SIZE)
|
_apply_label_style(objective_notice_label, UI_PARCHMENT_TEXT, OBJECTIVE_NOTICE_FONT_SIZE)
|
||||||
objective_notice_column.add_child(objective_notice_label)
|
objective_notice_column.add_child(objective_notice_label)
|
||||||
objective_notice_column.add_child(_make_scroll_rod(548, 3))
|
|
||||||
|
|
||||||
combat_result_panel = PanelContainer.new()
|
combat_result_panel = PanelContainer.new()
|
||||||
combat_result_panel.name = "CombatResultNotice"
|
combat_result_panel.name = "CombatResultNotice"
|
||||||
|
|||||||
@@ -588,6 +588,10 @@ func _check_battle_start_notice_sequence(failures: Array[String]) -> void:
|
|||||||
var notice_right_edge: float = scene.objective_notice_panel.position.x + scene.objective_notice_panel.size.x
|
var notice_right_edge: float = scene.objective_notice_panel.position.x + scene.objective_notice_panel.size.x
|
||||||
if notice_right_edge > BattleSceneScript.SIDE_PANEL_POSITION.x - 12.0:
|
if notice_right_edge > BattleSceneScript.SIDE_PANEL_POSITION.x - 12.0:
|
||||||
failures.append("battle start notice should not sit behind the side information panel: %s" % str(scene.objective_notice_panel.get_rect()))
|
failures.append("battle start notice should not sit behind the side information panel: %s" % str(scene.objective_notice_panel.get_rect()))
|
||||||
|
if scene.objective_notice_panel.size.x > 500.0 or scene.objective_notice_panel.size.y > 150.0:
|
||||||
|
failures.append("battle start notice should stay compact instead of covering the battlefield: %s" % str(scene.objective_notice_panel.get_rect()))
|
||||||
|
if str(scene.objective_notice_panel.get_meta("panel_style_variant", "")) != "hud_readable":
|
||||||
|
failures.append("battle start notice should use the dark readable HUD backing, not a bright parchment block")
|
||||||
if scene.objective_notice_panel.z_index < 60:
|
if scene.objective_notice_panel.z_index < 60:
|
||||||
failures.append("battle start notice should stay above ordinary HUD layers")
|
failures.append("battle start notice should stay above ordinary HUD layers")
|
||||||
if scene.objective_notice_icon_strip == null or scene.objective_notice_icon_strip.get_child_count() < 3:
|
if scene.objective_notice_icon_strip == null or scene.objective_notice_icon_strip.get_child_count() < 3:
|
||||||
|
|||||||
Reference in New Issue
Block a user