feat: add in-game debug console UI
This commit is contained in:
@@ -0,0 +1,71 @@
|
||||
[gd_scene format=3 uid="uid://bk0771dvonxh8"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://ypsdpciag6r6" path="res://src/Features/Console/Godot/ConsoleController.cs" id="1_script"]
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_console"]
|
||||
content_margin_left = 8.0
|
||||
content_margin_top = 8.0
|
||||
content_margin_right = 8.0
|
||||
content_margin_bottom = 8.0
|
||||
bg_color = Color(0, 0, 0, 0.85)
|
||||
|
||||
[sub_resource type="SystemFont" id="SystemFont_terminal"]
|
||||
font_names = PackedStringArray("Consolas", "Cascadia Mono", "Courier New")
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_input"]
|
||||
content_margin_left = 0.0
|
||||
content_margin_top = 12.0
|
||||
content_margin_right = 0.0
|
||||
content_margin_bottom = 0.0
|
||||
bg_color = Color(0, 0, 0, 0)
|
||||
|
||||
[node name="ConsoleController" type="CanvasLayer" unique_id=1711862908 node_paths=PackedStringArray("CommandInput", "OutputLog")]
|
||||
layer = 100
|
||||
script = ExtResource("1_script")
|
||||
CommandInput = NodePath("Panel/Container/InputRow/CommandInput")
|
||||
OutputLog = NodePath("Panel/Container/OutputLog")
|
||||
|
||||
[node name="Panel" type="PanelContainer" parent="." unique_id=515760683]
|
||||
anchors_preset = 10
|
||||
anchor_right = 1.0
|
||||
offset_bottom = 260.0
|
||||
theme_override_styles/panel = SubResource("StyleBoxFlat_console")
|
||||
|
||||
[node name="Container" type="VBoxContainer" parent="Panel" unique_id=37696848]
|
||||
layout_mode = 2
|
||||
theme_override_constants/separation = 0
|
||||
|
||||
[node name="OutputLog" type="RichTextLabel" parent="Panel/Container" unique_id=1318894518]
|
||||
custom_minimum_size = Vector2(0, 220)
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 3
|
||||
theme_override_fonts/normal_font = SubResource("SystemFont_terminal")
|
||||
theme_override_fonts/bold_font = SubResource("SystemFont_terminal")
|
||||
theme_override_fonts/italics_font = SubResource("SystemFont_terminal")
|
||||
theme_override_fonts/mono_font = SubResource("SystemFont_terminal")
|
||||
scroll_following = true
|
||||
|
||||
[node name="InputRow" type="HBoxContainer" parent="Panel/Container" unique_id=1183500371]
|
||||
layout_mode = 2
|
||||
theme_override_constants/separation = 4
|
||||
|
||||
[node name="PromptMargin" type="MarginContainer" parent="Panel/Container/InputRow" unique_id=1356750045]
|
||||
layout_mode = 2
|
||||
theme_override_constants/margin_top = 12
|
||||
|
||||
[node name="PromptLabel" type="Label" parent="Panel/Container/InputRow/PromptMargin" unique_id=429447266]
|
||||
layout_mode = 2
|
||||
theme_override_fonts/font = SubResource("SystemFont_terminal")
|
||||
text = ">"
|
||||
|
||||
[node name="CommandInput" type="LineEdit" parent="Panel/Container/InputRow" unique_id=209466737]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
theme_override_fonts/font = SubResource("SystemFont_terminal")
|
||||
theme_override_styles/normal = SubResource("StyleBoxFlat_input")
|
||||
theme_override_styles/read_only = SubResource("StyleBoxFlat_input")
|
||||
theme_override_styles/focus = SubResource("StyleBoxFlat_input")
|
||||
keep_editing_on_text_submit = true
|
||||
caret_blink = true
|
||||
|
||||
[connection signal="text_submitted" from="Panel/Container/InputRow/CommandInput" to="." method="OnInputSubmitted"]
|
||||
Reference in New Issue
Block a user