mirror of
https://github.com/lihop/godot-xterm.git
synced 2025-05-03 20:14:22 +02:00
Format .gd files and fix gdformat pre-commit hook
Previously this hook was not being run.
This commit is contained in:
parent
80bcc41855
commit
302bdf0714
5 changed files with 32 additions and 16 deletions
|
@ -18,7 +18,15 @@ const TITLE_WIDTH = 42
|
|||
|
||||
var menu_items := [
|
||||
{"name": "Asciicast", "scene": preload("../asciicast/asciicast.tscn")},
|
||||
{"name": "Terminal", "scene": preload("../web_console/web_console.tscn") if OS.has_feature("JavaScript") else preload("../terminal/terminal.tscn")},
|
||||
{
|
||||
"name": "Terminal",
|
||||
"scene":
|
||||
(
|
||||
preload("../web_console/web_console.tscn")
|
||||
if OS.has_feature("JavaScript")
|
||||
else preload("../terminal/terminal.tscn")
|
||||
)
|
||||
},
|
||||
{"name": "Exit"}
|
||||
]
|
||||
|
||||
|
@ -140,7 +148,11 @@ func _on_Terminal_key_pressed(data: String, event: InputEventKey) -> void:
|
|||
"Terminal not Supported on Windows"
|
||||
)
|
||||
var scene = item.scene.instance()
|
||||
var pty = scene if OS.has_feature("JavaScript") else scene.get_node("Pseudoterminal")
|
||||
var pty = (
|
||||
scene
|
||||
if OS.has_feature("JavaScript")
|
||||
else scene.get_node("Pseudoterminal")
|
||||
)
|
||||
get_tree().get_root().add_child(scene)
|
||||
visible = false
|
||||
scene.grab_focus()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue