mirror of
https://github.com/lihop/godot-xterm.git
synced 2025-05-08 13:15:31 +02:00
Godot 4 automatic changes
This commit is contained in:
parent
8b5caafbc7
commit
cdbf3f2adc
75 changed files with 1034 additions and 952 deletions
|
@ -21,18 +21,18 @@ class TestMultipleInputs:
|
|||
func press_key(scancode: int, unicode := 0) -> void:
|
||||
var key_down = InputEventKey.new()
|
||||
key_down.scancode = scancode
|
||||
key_down.pressed = true
|
||||
key_down.button_pressed = true
|
||||
Input.parse_input_event(key_down)
|
||||
yield(get_tree().create_timer(0.1), "timeout")
|
||||
await get_tree().create_timer(0.1).timeout
|
||||
var key_up = InputEventKey.new()
|
||||
key_up.scancode = scancode
|
||||
key_up.pressed = false
|
||||
key_up.button_pressed = false
|
||||
Input.parse_input_event(key_up)
|
||||
|
||||
func before_each():
|
||||
var scene := preload("../scenes/multiple_inputs.tscn").instance()
|
||||
var scene := preload("../scenes/multiple_inputs.tscn").instantiate()
|
||||
add_child_autofree(scene)
|
||||
terminal = scene.find_node("Terminal")
|
||||
terminal = scene.find_child("Terminal")
|
||||
terminal.grab_focus()
|
||||
|
||||
func test_terminal_keeps_focus_when_certain_keys_pressed():
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue