mirror of
https://github.com/lihop/godot-xterm.git
synced 2025-05-03 20:14:22 +02:00
Prevent loss of focus on Tab/Arrow key press
Prevents Terminal losing focus when in a scene with other inputs and the Tab or Arrow keys are pressed. Fixes #51.
This commit is contained in:
parent
8a3adbbe68
commit
d558b07fd4
3 changed files with 96 additions and 0 deletions
50
test/scenes/multiple_inputs.tscn
Normal file
50
test/scenes/multiple_inputs.tscn
Normal file
|
@ -0,0 +1,50 @@
|
|||
[gd_scene load_steps=2 format=2]
|
||||
|
||||
[ext_resource path="res://addons/godot_xterm/terminal.gd" type="Script" id=1]
|
||||
|
||||
[node name="HBoxContainer" type="HBoxContainer"]
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
|
||||
[node name="HBoxContainer" type="HBoxContainer" parent="."]
|
||||
margin_right = 1024.0
|
||||
margin_bottom = 600.0
|
||||
size_flags_horizontal = 3
|
||||
|
||||
[node name="TextEdit" type="TextEdit" parent="HBoxContainer"]
|
||||
margin_right = 338.0
|
||||
margin_bottom = 600.0
|
||||
size_flags_horizontal = 3
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="HBoxContainer"]
|
||||
margin_left = 342.0
|
||||
margin_right = 681.0
|
||||
margin_bottom = 600.0
|
||||
size_flags_horizontal = 3
|
||||
|
||||
[node name="TextEdit3" type="TextEdit" parent="HBoxContainer/VBoxContainer"]
|
||||
margin_right = 339.0
|
||||
margin_bottom = 197.0
|
||||
size_flags_vertical = 3
|
||||
|
||||
[node name="Terminal" type="Control" parent="HBoxContainer/VBoxContainer"]
|
||||
margin_top = 201.0
|
||||
margin_right = 339.0
|
||||
margin_bottom = 398.0
|
||||
focus_mode = 2
|
||||
size_flags_vertical = 3
|
||||
script = ExtResource( 1 )
|
||||
|
||||
[node name="TextEdit2" type="TextEdit" parent="HBoxContainer/VBoxContainer"]
|
||||
margin_top = 402.0
|
||||
margin_right = 339.0
|
||||
margin_bottom = 600.0
|
||||
size_flags_vertical = 3
|
||||
|
||||
[node name="TextEdit2" type="TextEdit" parent="HBoxContainer"]
|
||||
margin_left = 685.0
|
||||
margin_right = 1024.0
|
||||
margin_bottom = 600.0
|
||||
size_flags_horizontal = 3
|
||||
|
||||
[connection signal="data_sent" from="HBoxContainer/VBoxContainer/Terminal" to="HBoxContainer/VBoxContainer/Terminal" method="write"]
|
Loading…
Add table
Add a link
Reference in a new issue