From 0967a4654c9fa67b5cfc19edf3cfc075bf6bde92 Mon Sep 17 00:00:00 2001 From: Sophia Pearson Date: Sun, 4 Sep 2022 13:52:41 +0200 Subject: game: extract element scenes --- Scenes/Game/Game.tscn | 16 ++++++++++++++++ Scenes/Game/Input.tscn | 30 ++++++++++++++++++++++++++++++ Scenes/Game/Output.tscn | 30 ++++++++++++++++++++++++++++++ Scenes/Game/OutputBlock.tscn | 11 +++++++++++ Scenes/Game/StatusLine.tscn | 29 +++++++++++++++++++++++++++++ 5 files changed, 116 insertions(+) create mode 100644 Scenes/Game/Game.tscn create mode 100644 Scenes/Game/Input.tscn create mode 100644 Scenes/Game/Output.tscn create mode 100644 Scenes/Game/OutputBlock.tscn create mode 100644 Scenes/Game/StatusLine.tscn (limited to 'Scenes/Game') diff --git a/Scenes/Game/Game.tscn b/Scenes/Game/Game.tscn new file mode 100644 index 0000000..7843f3a --- /dev/null +++ b/Scenes/Game/Game.tscn @@ -0,0 +1,16 @@ +[gd_scene load_steps=4 format=2] + +[ext_resource path="res://Scenes/Game/StatusLine.tscn" type="PackedScene" id=1] +[ext_resource path="res://Scenes/Game/Output.tscn" type="PackedScene" id=2] +[ext_resource path="res://Scenes/Game/Input.tscn" type="PackedScene" id=3] + +[node name="Game" type="VBoxContainer"] +anchor_right = 1.0 +anchor_bottom = 1.0 +custom_constants/separation = 0 + +[node name="StatusLine" parent="." instance=ExtResource( 1 )] + +[node name="Output" parent="." instance=ExtResource( 2 )] + +[node name="Input" parent="." instance=ExtResource( 3 )] diff --git a/Scenes/Game/Input.tscn b/Scenes/Game/Input.tscn new file mode 100644 index 0000000..7106217 --- /dev/null +++ b/Scenes/Game/Input.tscn @@ -0,0 +1,30 @@ +[gd_scene format=2] + +[node name="Input" type="PanelContainer"] +margin_top = 451.0 +margin_right = 640.0 +margin_bottom = 480.0 +theme_type_variation = "InvertedPanelContainer" + +[node name="Container" type="HBoxContainer" parent="."] +margin_left = 8.0 +margin_top = 2.0 +margin_right = 632.0 +margin_bottom = 27.0 + +[node name="Prompt" type="Label" parent="Container"] +unique_name_in_owner = true +margin_right = 20.0 +margin_bottom = 25.0 +theme_type_variation = "InvertedLabel" +text = "?>" + +[node name="Text" type="LineEdit" parent="Container"] +unique_name_in_owner = true +margin_left = 28.0 +margin_right = 624.0 +margin_bottom = 25.0 +size_flags_horizontal = 3 +context_menu_enabled = false +selecting_enabled = false +caret_blink = true diff --git a/Scenes/Game/Output.tscn b/Scenes/Game/Output.tscn new file mode 100644 index 0000000..5a2cd3f --- /dev/null +++ b/Scenes/Game/Output.tscn @@ -0,0 +1,30 @@ +[gd_scene load_steps=2 format=2] + +[ext_resource path="res://Scenes/Game/OutputBlock.tscn" type="PackedScene" id=1] + +[node name="Output" type="PanelContainer"] +margin_top = 31.0 +margin_right = 640.0 +margin_bottom = 451.0 +size_flags_horizontal = 3 +size_flags_vertical = 3 + +[node name="ScrollContainer" type="ScrollContainer" parent="."] +margin_left = 8.0 +margin_top = 2.0 +margin_right = 632.0 +margin_bottom = 418.0 +mouse_filter = 1 +size_flags_horizontal = 3 +size_flags_vertical = 3 +scroll_horizontal_enabled = false + +[node name="LineContainer" type="VBoxContainer" parent="ScrollContainer"] +unique_name_in_owner = true +margin_right = 624.0 +margin_bottom = 54.0 +size_flags_horizontal = 3 + +[node name="OutputBlock" type="MarginContainer" parent="ScrollContainer/LineContainer" instance=ExtResource( 1 )] +margin_right = 624.0 +margin_bottom = 54.0 diff --git a/Scenes/Game/OutputBlock.tscn b/Scenes/Game/OutputBlock.tscn new file mode 100644 index 0000000..e6f0dfd --- /dev/null +++ b/Scenes/Game/OutputBlock.tscn @@ -0,0 +1,11 @@ +[gd_scene format=2] + +[node name="OutputBlock" type="MarginContainer"] +anchor_right = 1.0 + +[node name="ContentLabel" type="RichTextLabel" parent="."] +margin_right = 640.0 +margin_bottom = 54.0 +text = "This is where the output goes and it should wrap correctly if it goes beyond the screen width." +fit_content_height = true +scroll_active = false diff --git a/Scenes/Game/StatusLine.tscn b/Scenes/Game/StatusLine.tscn new file mode 100644 index 0000000..1392507 --- /dev/null +++ b/Scenes/Game/StatusLine.tscn @@ -0,0 +1,29 @@ +[gd_scene load_steps=2 format=2] + +[ext_resource path="res://Scripts/Game/StatusLine.cs" type="Script" id=1] + +[node name="StatusLine" type="PanelContainer"] +margin_right = 640.0 +margin_bottom = 31.0 +theme_type_variation = "InvertedPanelContainer" +script = ExtResource( 1 ) +Title = "Adventure Title" + +[node name="Container" type="HBoxContainer" parent="."] +margin_left = 8.0 +margin_top = 2.0 +margin_right = 632.0 +margin_bottom = 29.0 +size_flags_horizontal = 3 + +[node name="TitleLabel" type="RichTextLabel" parent="Container"] +unique_name_in_owner = true +margin_right = 624.0 +margin_bottom = 27.0 +size_flags_horizontal = 3 +size_flags_vertical = 6 +theme_type_variation = "InvertedRichTextLabel" +bbcode_enabled = true +text = "This is where the title goes." +fit_content_height = true +scroll_active = false -- cgit v1.2.3