diff options
| author | Sophia Pearson <codergal89@gmail.com> | 2022-09-04 15:43:12 +0200 |
|---|---|---|
| committer | Sophia Pearson <codergal89@gmail.com> | 2022-09-04 15:44:04 +0200 |
| commit | 2f3abbb6f1141f15ef77ac27e431bc66bb0c7899 (patch) | |
| tree | 17f7ee50161e1de1c11c6dd14a54a11614e7de03 /Scenes | |
| parent | 0967a4654c9fa67b5cfc19edf3cfc075bf6bde92 (diff) | |
| download | texty-2f3abbb6f1141f15ef77ac27e431bc66bb0c7899.tar.xz texty-2f3abbb6f1141f15ef77ac27e431bc66bb0c7899.zip | |
game: adapt scripts to new design
Diffstat (limited to 'Scenes')
| -rw-r--r-- | Scenes/Game/Game.tscn | 16 | ||||
| -rw-r--r-- | Scenes/Game/Input.tscn | 16 | ||||
| -rw-r--r-- | Scenes/Game/Output.tscn | 7 | ||||
| -rw-r--r-- | Scenes/Game/OutputBlock.tscn | 7 |
4 files changed, 38 insertions, 8 deletions
diff --git a/Scenes/Game/Game.tscn b/Scenes/Game/Game.tscn index 7843f3a..e51a434 100644 --- a/Scenes/Game/Game.tscn +++ b/Scenes/Game/Game.tscn @@ -1,16 +1,30 @@ -[gd_scene load_steps=4 format=2] +[gd_scene load_steps=6 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://Scripts/Game/Game.cs" type="Script" id=4] +[ext_resource path="res://Scenes/Game/OutputBlock.tscn" type="PackedScene" id=5] [node name="Game" type="VBoxContainer"] anchor_right = 1.0 anchor_bottom = 1.0 custom_constants/separation = 0 +script = ExtResource( 4 ) [node name="StatusLine" parent="." instance=ExtResource( 1 )] +unique_name_in_owner = true [node name="Output" parent="." instance=ExtResource( 2 )] +unique_name_in_owner = true +OutputBlockScene = ExtResource( 5 ) [node name="Input" parent="." 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"] diff --git a/Scenes/Game/Input.tscn b/Scenes/Game/Input.tscn index 7106217..627a0ac 100644 --- a/Scenes/Game/Input.tscn +++ b/Scenes/Game/Input.tscn @@ -1,10 +1,12 @@ -[gd_scene format=2] +[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"] -margin_top = 451.0 -margin_right = 640.0 -margin_bottom = 480.0 +anchor_right = 1.0 theme_type_variation = "InvertedPanelContainer" +script = ExtResource( 1 ) [node name="Container" type="HBoxContainer" parent="."] margin_left = 8.0 @@ -28,3 +30,9 @@ 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/Text" to="." method="OnTextEntered"] diff --git a/Scenes/Game/Output.tscn b/Scenes/Game/Output.tscn index 5a2cd3f..68f36f4 100644 --- a/Scenes/Game/Output.tscn +++ b/Scenes/Game/Output.tscn @@ -1,6 +1,7 @@ -[gd_scene load_steps=2 format=2] +[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"] margin_top = 31.0 @@ -8,6 +9,7 @@ margin_right = 640.0 margin_bottom = 451.0 size_flags_horizontal = 3 size_flags_vertical = 3 +script = ExtResource( 2 ) [node name="ScrollContainer" type="ScrollContainer" parent="."] margin_left = 8.0 @@ -25,6 +27,7 @@ margin_right = 624.0 margin_bottom = 54.0 size_flags_horizontal = 3 -[node name="OutputBlock" type="MarginContainer" parent="ScrollContainer/LineContainer" instance=ExtResource( 1 )] +[node name="OutputBlock" parent="ScrollContainer/LineContainer" instance=ExtResource( 1 )] +anchor_right = 0.0 margin_right = 624.0 margin_bottom = 54.0 diff --git a/Scenes/Game/OutputBlock.tscn b/Scenes/Game/OutputBlock.tscn index e6f0dfd..aa1d60f 100644 --- a/Scenes/Game/OutputBlock.tscn +++ b/Scenes/Game/OutputBlock.tscn @@ -1,9 +1,14 @@ -[gd_scene format=2] +[gd_scene load_steps=2 format=2] + +[ext_resource path="res://Scripts/Game/OutputBlock.cs" type="Script" id=1] [node name="OutputBlock" type="MarginContainer"] anchor_right = 1.0 +script = ExtResource( 1 ) +Content = "This is where the output goes." [node name="ContentLabel" type="RichTextLabel" parent="."] +unique_name_in_owner = true 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." |
