diff options
| author | Sophia Pearson <codergal89@gmail.com> | 2022-09-05 20:35:53 +0200 |
|---|---|---|
| committer | Sophia Pearson <codergal89@gmail.com> | 2022-09-05 20:35:53 +0200 |
| commit | f20bd89dc4a7bf14a88b1effcaa1887b29314525 (patch) | |
| tree | d114787f68efd2a7d61d95fa9c84e8e5d69a7c11 /Scenes | |
| parent | 1b477b62f8be8c546a35dbd1d2688ebf623c496f (diff) | |
| download | texty-f20bd89dc4a7bf14a88b1effcaa1887b29314525.tar.xz texty-f20bd89dc4a7bf14a88b1effcaa1887b29314525.zip | |
gui: split GUI into Terminal components
Diffstat (limited to 'Scenes')
| -rw-r--r-- | Scenes/Game/CommandInputArea.tscn | 12 | ||||
| -rw-r--r-- | Scenes/Game/Game.tscn | 51 | ||||
| -rw-r--r-- | Scenes/Game/Input.tscn | 38 | ||||
| -rw-r--r-- | Scenes/Game/Output.tscn | 29 | ||||
| -rw-r--r-- | Scenes/Game/StatusLine.tscn | 28 | ||||
| -rw-r--r-- | Scenes/Terminal/InputArea.tscn | 27 | ||||
| -rw-r--r-- | Scenes/Terminal/OutputArea.tscn | 18 | ||||
| -rw-r--r-- | Scenes/Terminal/OutputBlock.tscn (renamed from Scenes/Game/OutputBlock.tscn) | 4 | ||||
| -rw-r--r-- | Scenes/Terminal/Screen.tscn | 25 | ||||
| -rw-r--r-- | Scenes/Terminal/StatusArea.tscn | 19 |
10 files changed, 132 insertions, 119 deletions
diff --git a/Scenes/Game/CommandInputArea.tscn b/Scenes/Game/CommandInputArea.tscn new file mode 100644 index 0000000..b377443 --- /dev/null +++ b/Scenes/Game/CommandInputArea.tscn @@ -0,0 +1,12 @@ +[gd_scene load_steps=4 format=2] + +[ext_resource path="res://Scenes/Terminal/InputArea.tscn" type="PackedScene" id=1] +[ext_resource path="res://Scripts/Game/CommandParser.cs" type="Script" id=2] +[ext_resource path="res://Scripts/Game/CommandInputArea.cs" type="Script" id=3] + +[node name="CommandInputArea" instance=ExtResource( 1 )] +script = ExtResource( 3 ) + +[node name="CommandParser" type="Node" parent="." index="2"] +unique_name_in_owner = true +script = ExtResource( 2 ) diff --git a/Scenes/Game/Game.tscn b/Scenes/Game/Game.tscn index 7ea6324..e2f7bc2 100644 --- a/Scenes/Game/Game.tscn +++ b/Scenes/Game/Game.tscn @@ -1,38 +1,43 @@ -[gd_scene load_steps=6 format=2] +[gd_scene load_steps=7 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] +[ext_resource path="res://Scenes/Terminal/Screen.tscn" type="PackedScene" id=1] +[ext_resource path="res://Scenes/Terminal/OutputArea.tscn" type="PackedScene" id=2] +[ext_resource path="res://Scenes/Game/CommandInputArea.tscn" type="PackedScene" id=3] [ext_resource path="res://Scripts/Game/Game.cs" type="Script" id=4] -[ext_resource path="res://Scenes/Game/OutputBlock.tscn" type="PackedScene" id=5] +[ext_resource path="res://Scenes/Terminal/StatusArea.tscn" type="PackedScene" id=5] +[ext_resource path="res://Scenes/Terminal/OutputBlock.tscn" type="PackedScene" id=6] -[node name="Game" type="VBoxContainer"] -anchor_right = 1.0 -anchor_bottom = 1.0 -custom_constants/separation = 0 +[node name="Game" type="Node"] script = ExtResource( 4 ) -[node name="StatusLine" parent="." instance=ExtResource( 1 )] +[node name="Screen" parent="." instance=ExtResource( 1 )] + +[node name="TopBar" parent="Screen/ScreenContainer" index="0"] +margin_bottom = 27.0 + +[node name="StatusArea" parent="Screen/ScreenContainer/TopBar" index="0" instance=ExtResource( 5 )] unique_name_in_owner = true Title = "Adventure Title" -[node name="Output" parent="." instance=ExtResource( 2 )] +[node name="Content" parent="Screen/ScreenContainer" index="1"] +margin_top = 27.0 +margin_bottom = 455.0 + +[node name="OutputArea" parent="Screen/ScreenContainer/Content" index="0" instance=ExtResource( 2 )] unique_name_in_owner = true anchor_right = 0.0 anchor_bottom = 0.0 -margin_top = 31.0 margin_right = 640.0 -margin_bottom = 451.0 -size_flags_horizontal = 3 -size_flags_vertical = 3 -OutputBlockScene = ExtResource( 5 ) +margin_bottom = 428.0 +OutputBlockScene = ExtResource( 6 ) + +[node name="BottomBar" parent="Screen/ScreenContainer" index="2"] +margin_top = 455.0 -[node name="Input" parent="." instance=ExtResource( 3 )] +[node name="InputArea" parent="Screen/ScreenContainer/BottomBar" index="0" instance=ExtResource( 3 )] unique_name_in_owner = true -anchor_right = 0.0 -margin_top = 451.0 -margin_right = 640.0 -margin_bottom = 480.0 -[connection signal="CommandSubmitted" from="Input" to="." method="OnCommandSubmitted"] -[connection signal="UnknownInputSubmitted" from="Input" to="." method="OnUnknownInputSubmitted"] +[connection signal="CommandSubmitted" from="Screen/ScreenContainer/BottomBar/InputArea" to="." method="OnCommandSubmitted"] +[connection signal="UnknownInputSubmitted" from="Screen/ScreenContainer/BottomBar/InputArea" to="." method="OnUnknownInputSubmitted"] + +[editable path="Screen"] diff --git a/Scenes/Game/Input.tscn b/Scenes/Game/Input.tscn deleted file mode 100644 index baf5315..0000000 --- a/Scenes/Game/Input.tscn +++ /dev/null @@ -1,38 +0,0 @@ -[gd_scene load_steps=3 format=2] - -[ext_resource path="res://Scripts/Game/Input.cs" type="Script" id=1] -[ext_resource path="res://Scripts/Game/CommandParser.cs" type="Script" id=2] - -[node name="Input" type="PanelContainer"] -anchor_right = 1.0 -theme_type_variation = "InvertedPanelContainer" -script = ExtResource( 1 ) - -[node name="Container" type="HBoxContainer" parent="."] -margin_left = 8.0 -margin_top = 2.0 -margin_right = 632.0 -margin_bottom = 27.0 - -[node name="PromptLabel" type="Label" parent="Container"] -unique_name_in_owner = true -margin_right = 20.0 -margin_bottom = 25.0 -theme_type_variation = "InvertedLabel" -text = "?>" - -[node name="TextInput" 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 - -[node name="CommandParser" type="Node" parent="."] -unique_name_in_owner = true -script = ExtResource( 2 ) - -[connection signal="text_entered" from="Container/TextInput" to="." method="OnTextEntered"] diff --git a/Scenes/Game/Output.tscn b/Scenes/Game/Output.tscn deleted file mode 100644 index 70ca6c3..0000000 --- a/Scenes/Game/Output.tscn +++ /dev/null @@ -1,29 +0,0 @@ -[gd_scene load_steps=3 format=2] - -[ext_resource path="res://Scenes/Game/OutputBlock.tscn" type="PackedScene" id=1] -[ext_resource path="res://Scripts/Game/Output.cs" type="Script" id=2] - -[node name="Output" type="PanelContainer"] -anchor_right = 1.0 -anchor_bottom = 1.0 -script = ExtResource( 2 ) - -[node name="ScrollContainer" type="ScrollContainer" parent="."] -margin_left = 8.0 -margin_top = 2.0 -margin_right = 632.0 -margin_bottom = 478.0 -mouse_filter = 1 -scroll_horizontal_enabled = false - -[node name="LineContainer" type="VBoxContainer" parent="ScrollContainer"] -unique_name_in_owner = true -margin_right = 624.0 -margin_bottom = 476.0 -size_flags_horizontal = 3 -size_flags_vertical = 3 - -[node name="OutputBlock" parent="ScrollContainer/LineContainer" instance=ExtResource( 1 )] -anchor_right = 0.0 -margin_right = 624.0 -margin_bottom = 27.0 diff --git a/Scenes/Game/StatusLine.tscn b/Scenes/Game/StatusLine.tscn deleted file mode 100644 index fc167ec..0000000 --- a/Scenes/Game/StatusLine.tscn +++ /dev/null @@ -1,28 +0,0 @@ -[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 ) - -[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 diff --git a/Scenes/Terminal/InputArea.tscn b/Scenes/Terminal/InputArea.tscn new file mode 100644 index 0000000..5532c6d --- /dev/null +++ b/Scenes/Terminal/InputArea.tscn @@ -0,0 +1,27 @@ +[gd_scene load_steps=2 format=2] + +[ext_resource path="res://Scripts/Terminal/InputArea.cs" type="Script" id=1] + +[node name="InputArea" type="HBoxContainer"] +margin_right = 640.0 +margin_bottom = 25.0 +script = ExtResource( 1 ) + +[node name="PromptLabel" type="Label" parent="."] +unique_name_in_owner = true +margin_right = 20.0 +margin_bottom = 25.0 +theme_type_variation = "InvertedLabel" +text = "?>" + +[node name="TextInput" type="LineEdit" parent="."] +unique_name_in_owner = true +margin_left = 28.0 +margin_right = 640.0 +margin_bottom = 25.0 +size_flags_horizontal = 3 +context_menu_enabled = false +selecting_enabled = false +caret_blink = true + +[connection signal="text_entered" from="TextInput" to="." method="OnTextEntered"] diff --git a/Scenes/Terminal/OutputArea.tscn b/Scenes/Terminal/OutputArea.tscn new file mode 100644 index 0000000..779b0b7 --- /dev/null +++ b/Scenes/Terminal/OutputArea.tscn @@ -0,0 +1,18 @@ +[gd_scene load_steps=2 format=2] + +[ext_resource path="res://Scripts/Terminal/OutputArea.cs" type="Script" id=1] + +[node name="OutputArea" type="ScrollContainer"] +anchor_right = 1.0 +anchor_bottom = 1.0 +mouse_filter = 1 +scroll_horizontal_enabled = false +script = ExtResource( 1 ) + +[node name="LineContainer" type="VBoxContainer" parent="."] +unique_name_in_owner = true +margin_right = 640.0 +margin_bottom = 480.0 +size_flags_horizontal = 3 +size_flags_vertical = 3 +custom_constants/separation = 0 diff --git a/Scenes/Game/OutputBlock.tscn b/Scenes/Terminal/OutputBlock.tscn index f4fc1dd..962aa0c 100644 --- a/Scenes/Game/OutputBlock.tscn +++ b/Scenes/Terminal/OutputBlock.tscn @@ -1,15 +1,17 @@ [gd_scene load_steps=2 format=2] -[ext_resource path="res://Scripts/Game/OutputBlock.cs" type="Script" id=1] +[ext_resource path="res://Scripts/Terminal/OutputBlock.cs" type="Script" id=1] [node name="OutputBlock" type="MarginContainer"] anchor_right = 1.0 +size_flags_horizontal = 3 script = ExtResource( 1 ) [node name="ContentLabel" type="RichTextLabel" parent="."] unique_name_in_owner = true margin_right = 640.0 margin_bottom = 27.0 +size_flags_horizontal = 3 bbcode_enabled = true fit_content_height = true scroll_active = false diff --git a/Scenes/Terminal/Screen.tscn b/Scenes/Terminal/Screen.tscn new file mode 100644 index 0000000..b003db2 --- /dev/null +++ b/Scenes/Terminal/Screen.tscn @@ -0,0 +1,25 @@ +[gd_scene format=2] + +[node name="Screen" type="Control"] +anchor_right = 1.0 +anchor_bottom = 1.0 + +[node name="ScreenContainer" type="VBoxContainer" parent="."] +anchor_right = 1.0 +anchor_bottom = 1.0 +custom_constants/separation = 0 + +[node name="TopBar" type="PanelContainer" parent="ScreenContainer"] +margin_right = 640.0 +theme_type_variation = "InvertedPanelContainer" + +[node name="Content" type="PanelContainer" parent="ScreenContainer"] +margin_right = 640.0 +margin_bottom = 480.0 +size_flags_vertical = 3 + +[node name="BottomBar" type="PanelContainer" parent="ScreenContainer"] +margin_top = 480.0 +margin_right = 640.0 +margin_bottom = 480.0 +theme_type_variation = "InvertedPanelContainer" diff --git a/Scenes/Terminal/StatusArea.tscn b/Scenes/Terminal/StatusArea.tscn new file mode 100644 index 0000000..21bcd94 --- /dev/null +++ b/Scenes/Terminal/StatusArea.tscn @@ -0,0 +1,19 @@ +[gd_scene load_steps=2 format=2] + +[ext_resource path="res://Scripts/Terminal/StatusArea.cs" type="Script" id=1] + +[node name="StatusArea" type="HBoxContainer"] +margin_right = 640.0 +margin_bottom = 27.0 +script = ExtResource( 1 ) + +[node name="TitleLabel" type="RichTextLabel" parent="."] +unique_name_in_owner = true +margin_right = 640.0 +margin_bottom = 27.0 +size_flags_horizontal = 3 +theme_type_variation = "InvertedRichTextLabel" +bbcode_enabled = true +bbcode_text = "This is where the title goes" +text = "This is where the title goes" +fit_content_height = true |
