added windows pty support

This commit is contained in:
Alexander Treml 2025-06-26 15:54:12 +02:00 committed by Leroy Hopson
parent 77ae56f72d
commit bd399e5603
No known key found for this signature in database
GPG key ID: D2747312A6DB51AA
23 changed files with 1478 additions and 695 deletions

View file

@ -145,17 +145,6 @@ func _on_Terminal_key_pressed(data: String, event: InputEventKey) -> void:
$Terminal.grab_focus()
scene.queue_free()
"Terminal":
if OS.get_name() == "Windows":
OS.call_deferred(
"alert",
(
"Psuedoterminal node currently"
+ " uses pty.h but needs to use either winpty or conpty"
+ " to work on Windows."
),
"Terminal not Supported on Windows"
)
return
var scene = item.scene.instantiate()
var pty = scene if OS.has_feature("web") else scene.get_node("PTY")
add_child(scene)

View file

@ -1,7 +1,7 @@
[gd_scene load_steps=3 format=3 uid="uid://brjrtf5fpptw8"]
[ext_resource type="Script" path="res://examples/menu/menu.gd" id="2"]
[ext_resource type="Theme" uid="uid://0gk8swmcldbg" path="res://themes/demo.tres" id="2_7f2wl"]
[ext_resource type="Theme" uid="uid://0gk8swmcldbg" path="res://themes/demo.tres" id="2_pr2sv"]
[node name="Menu" type="Control"]
layout_mode = 3
@ -19,4 +19,4 @@ anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
theme = ExtResource("2_7f2wl")
theme = ExtResource("2_pr2sv")