Integrate per-save identity and interaction UI
This commit is contained in:
parent
ac82a28f3b
commit
4fda6e97f6
58 changed files with 3471 additions and 461 deletions
43
tests/tooltip_escape_validation.gd
Normal file
43
tests/tooltip_escape_validation.gd
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
extends SceneTree
|
||||
|
||||
const MainScene: PackedScene = preload("res://main/main.tscn")
|
||||
|
||||
|
||||
func _initialize() -> void:
|
||||
call_deferred("_run")
|
||||
|
||||
|
||||
func _run() -> void:
|
||||
root.size = Vector2i(1280, 720)
|
||||
var main: Node = MainScene.instantiate()
|
||||
root.add_child(main)
|
||||
for _frame: int in 4:
|
||||
await process_frame
|
||||
if not bool(main.get("_application_initialized")):
|
||||
main.call("_activate_selected_data_path", "", true)
|
||||
for _frame: int in 8:
|
||||
await process_frame
|
||||
assert(bool(main.get("_application_initialized")))
|
||||
|
||||
var game_ui: GameUI = main.get("_game_ui") as GameUI
|
||||
var player_menu: PlayerMenu = game_ui.get_node("%PlayerMenu") as PlayerMenu
|
||||
assert(game_ui != null and player_menu != null)
|
||||
game_ui.get_title_screen().hide()
|
||||
main.set("_gameplay_started", true)
|
||||
player_menu.show()
|
||||
player_menu.set("_transitioning", false)
|
||||
|
||||
# Input.action_press updates global action state without delivering an
|
||||
# InputEvent to Main._input. That reproduces the path used when a native
|
||||
# tooltip window consumes Escape before the gameplay viewport receives it.
|
||||
Input.action_press("ui_cancel")
|
||||
await process_frame
|
||||
Input.action_release("ui_cancel")
|
||||
for _frame: int in 40:
|
||||
await process_frame
|
||||
assert(not player_menu.visible)
|
||||
|
||||
main.queue_free()
|
||||
await process_frame
|
||||
print("Tooltip Escape validation: PASS")
|
||||
quit(0)
|
||||
Loading…
Add table
Add a link
Reference in a new issue