Added selectable container that can be focused with keyboard shortcut.

This commit is contained in:
RedNicStone committed 2026-11-05 11:39:10 +00:00
1 parent 9bf7c3fa6e
commit 948b177eee
7 files changed
+265 -2

No files matched your search

+54
View File
@@ -0,0 +1,54 @@
[gd_scene format=3 uid="uid://s7f003dyd60i"]
[ext_resource type="Script" uid="uid://cxerh1gbkrop2" path="res://scripts/selectable_container.gd" id="1_focus"]
[sub_resource type="LabelSettings" id="LabelSettings_0fpm5"]
font_size = 24
[node name="SelectableContainer" type="MarginContainer" unique_id=903061831]
anchors_preset = -1
anchor_right = 1.0
anchor_bottom = 1.0
offset_left = 4.0
offset_top = 4.0
offset_right = -4.0
offset_bottom = -4.0
grow_horizontal = 2
grow_vertical = 2
script = ExtResource("1_focus")
[node name="PanelContainer" type="PanelContainer" parent="." unique_id=555833581]
layout_mode = 2
[node name="MarginContainer" type="MarginContainer" parent="." unique_id=701103853]
layout_mode = 2
theme_override_constants/margin_left = 16
theme_override_constants/margin_top = 16
theme_override_constants/margin_right = 16
theme_override_constants/margin_bottom = 16
[node name="VBoxContainer" type="VBoxContainer" parent="MarginContainer" unique_id=1200250605]
layout_mode = 2
[node name="HBoxContainer" type="HBoxContainer" parent="MarginContainer/VBoxContainer" unique_id=157590431]
layout_mode = 2
size_flags_vertical = 0
[node name="Label" type="Label" parent="MarginContainer/VBoxContainer/HBoxContainer" unique_id=1765103253]
layout_mode = 2
size_flags_horizontal = 0
size_flags_vertical = 1
text = "Panel"
label_settings = SubResource("LabelSettings_0fpm5")
[node name="Button" type="Button" parent="MarginContainer/VBoxContainer/HBoxContainer" unique_id=519793654]
layout_mode = 2
size_flags_horizontal = 10
text = "F1"
[node name="HSeparator" type="HSeparator" parent="MarginContainer/VBoxContainer" unique_id=1046926303]
layout_mode = 2
[node name="Content" type="VBoxContainer" parent="MarginContainer/VBoxContainer" unique_id=1706387279]
layout_mode = 2
size_flags_vertical = 3
+26
View File
@@ -0,0 +1,26 @@
[gd_scene format=3 uid="uid://chflnxm5486kc"]
[ext_resource type="PackedScene" uid="uid://s7f003dyd60i" path="res://components/selectable_container.tscn" id="1_panel"]
[ext_resource type="Script" uid="uid://cjghwf3b858xu" path="res://scripts/terminal_panel.gd" id="2_terminal"]
[node name="TerminalPanel" unique_id=690518475 instance=ExtResource("1_panel")]
script = ExtResource("2_terminal")
title = "ROV terminal"
initial_focus = NodePath("Command")
[node name="Label" parent="MarginContainer/VBoxContainer/HBoxContainer" parent_id_path=PackedInt32Array(157590431) index="0" unique_id=1765103253]
text = "ROV terminal"
[node name="Output" type="RichTextLabel" parent="." index="2" unique_id=1341181181]
custom_minimum_size = Vector2(260, 100)
layout_mode = 2
size_flags_vertical = 3
focus_mode = 2
text = "SSH transport not connected.
Press the panel shortcut, then type a command.
"
scroll_following = true
[node name="Command" type="LineEdit" parent="." index="3" unique_id=701067863]
layout_mode = 2
placeholder_text = "Enter command…"