Add hover hints for icon commands
This commit is contained in:
@@ -4205,6 +4205,19 @@ func _check_hud_command_grid_layout(failures: Array[String]) -> void:
|
||||
continue
|
||||
if button.tooltip_text.strip_edges().is_empty():
|
||||
failures.append("unit command icon should expose its command through tooltip: %s" % str(button.name))
|
||||
scene._on_command_hint_button_mouse_entered(scene.wait_button)
|
||||
if scene.command_hint_panel == null or not scene.command_hint_panel.visible:
|
||||
failures.append("hovering a unit command icon should show the command hint panel")
|
||||
else:
|
||||
if scene.command_hint_title_label == null or scene.command_hint_title_label.text != "대기":
|
||||
failures.append("unit command hint should show command title: %s" % ("" if scene.command_hint_title_label == null else scene.command_hint_title_label.text))
|
||||
if scene.command_hint_detail_label == null or not scene.command_hint_detail_label.text.contains("부대 미지정"):
|
||||
failures.append("disabled unit command hint should show the blocked reason: %s" % ("" if scene.command_hint_detail_label == null else scene.command_hint_detail_label.text))
|
||||
if scene.command_hint_icon == null or scene.command_hint_icon.texture == null:
|
||||
failures.append("unit command hint should show generated command icon artwork")
|
||||
scene._on_command_hint_button_mouse_exited()
|
||||
if scene.command_hint_panel != null and scene.command_hint_panel.visible:
|
||||
failures.append("unit command hint panel should hide when leaving the icon")
|
||||
var top_toolbar := scene.end_turn_button.get_parent() as HBoxContainer
|
||||
if top_toolbar == null or top_toolbar.name != "TopToolBar":
|
||||
failures.append("global battle commands should move to the top icon toolbar")
|
||||
@@ -4228,6 +4241,16 @@ func _check_hud_command_grid_layout(failures: Array[String]) -> void:
|
||||
_check_button_uses_generated_surface(failures, button, str(button.name))
|
||||
if button.custom_minimum_size.x < BattleSceneScript.TOP_TOOL_BUTTON_SIZE.x or button.custom_minimum_size.y < BattleSceneScript.TOP_TOOL_BUTTON_SIZE.y:
|
||||
failures.append("top tool button should reserve stable icon space: %s" % str(button.custom_minimum_size))
|
||||
scene._on_command_hint_button_mouse_entered(scene.end_turn_button)
|
||||
if scene.command_hint_panel == null or not scene.command_hint_panel.visible:
|
||||
failures.append("hovering a top command icon should show the command hint panel")
|
||||
else:
|
||||
if scene.command_hint_title_label == null or scene.command_hint_title_label.text != "차례 종료":
|
||||
failures.append("top command hint should show command title: %s" % ("" if scene.command_hint_title_label == null else scene.command_hint_title_label.text))
|
||||
if scene.command_hint_detail_label == null or not scene.command_hint_detail_label.text.contains("적군"):
|
||||
failures.append("top command hint should keep command detail: %s" % ("" if scene.command_hint_detail_label == null else scene.command_hint_detail_label.text))
|
||||
if scene.command_hint_icon == null or scene.command_hint_icon.texture == null or str(scene.end_turn_button.get_meta("command_icon", "")) != "end_turn":
|
||||
failures.append("top command hint should use generated top command icon artwork")
|
||||
scene.free()
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user