Rename a few container nodes to have more pleasant names

This commit is contained in:
Sebastian Morr 2020-09-29 14:26:20 +02:00
parent f6ec691ece
commit 5f2823fab4
7 changed files with 65 additions and 62 deletions

18
main.gd
View File

@ -5,17 +5,17 @@ var dragged = null
var chapter = "bottom-up"
var current_level = 0
onready var terminal = $HBoxContainer/RightSide/Terminal
onready var terminal = $Columns/RightSide/Terminal
onready var input = terminal.input
onready var output = terminal.output
onready var goal_repository = $HBoxContainer/Repositories/GoalRepository
onready var active_repository = $HBoxContainer/Repositories/ActiveRepository
onready var level_select = $HBoxContainer/RightSide/TopStuff/Menu/LevelSelect
onready var chapter_select = $HBoxContainer/RightSide/TopStuff/Menu/ChapterSelect
onready var next_level_button = $HBoxContainer/RightSide/TopStuff/Menu/NextLevelButton
onready var level_name = $HBoxContainer/RightSide/TopStuff/LevelPanel/LevelName
onready var level_description = $HBoxContainer/RightSide/TopStuff/LevelPanel/Text/LevelDescription
onready var level_congrats = $HBoxContainer/RightSide/TopStuff/LevelPanel/Text/LevelCongrats
onready var goal_repository = $Columns/Repositories/GoalRepository
onready var active_repository = $Columns/Repositories/ActiveRepository
onready var level_select = $Columns/RightSide/TopStuff/Menu/LevelSelect
onready var chapter_select = $Columns/RightSide/TopStuff/Menu/ChapterSelect
onready var next_level_button = $Columns/RightSide/TopStuff/Menu/NextLevelButton
onready var level_name = $Columns/RightSide/TopStuff/LevelPanel/LevelName
onready var level_description = $Columns/RightSide/TopStuff/LevelPanel/Text/LevelDescription
onready var level_congrats = $Columns/RightSide/TopStuff/LevelPanel/Text/LevelCongrats
func _ready():
# Initialize level select.

View File

@ -39,7 +39,7 @@ __meta__ = {
"_edit_use_anchors_": false
}
[node name="HBoxContainer" type="HSplitContainer" parent="."]
[node name="Columns" type="HSplitContainer" parent="."]
anchor_right = 1.0
anchor_bottom = 1.0
margin_left = 5.0
@ -51,7 +51,7 @@ __meta__ = {
"_edit_use_anchors_": false
}
[node name="Repositories" type="HBoxContainer" parent="HBoxContainer"]
[node name="Repositories" type="HBoxContainer" parent="Columns"]
margin_right = 1267.0
margin_bottom = 1070.0
mouse_filter = 2
@ -62,7 +62,7 @@ __meta__ = {
"_edit_use_anchors_": false
}
[node name="GoalRepository" parent="HBoxContainer/Repositories" instance=ExtResource( 3 )]
[node name="GoalRepository" parent="Columns/Repositories" instance=ExtResource( 3 )]
anchor_right = 0.0
anchor_bottom = 0.0
margin_right = 633.0
@ -72,7 +72,7 @@ size_flags_vertical = 3
label = "Goal"
file_browser_active = false
[node name="ActiveRepository" parent="HBoxContainer/Repositories" instance=ExtResource( 3 )]
[node name="ActiveRepository" parent="Columns/Repositories" instance=ExtResource( 3 )]
anchor_right = 0.0
anchor_bottom = 0.0
margin_left = 633.0
@ -82,34 +82,34 @@ size_flags_horizontal = 3
size_flags_vertical = 3
label = "Your repository"
[node name="RightSide" type="VSplitContainer" parent="HBoxContainer"]
[node name="RightSide" type="VSplitContainer" parent="Columns"]
margin_left = 1279.0
margin_right = 1910.0
margin_bottom = 1070.0
size_flags_horizontal = 3
[node name="TopStuff" type="VBoxContainer" parent="HBoxContainer/RightSide"]
[node name="TopStuff" type="VBoxContainer" parent="Columns/RightSide"]
margin_right = 631.0
margin_bottom = 529.0
size_flags_vertical = 3
[node name="Menu" type="HBoxContainer" parent="HBoxContainer/RightSide/TopStuff"]
[node name="Menu" type="HBoxContainer" parent="Columns/RightSide/TopStuff"]
margin_right = 631.0
margin_bottom = 35.0
[node name="ChapterSelect" type="OptionButton" parent="HBoxContainer/RightSide/TopStuff/Menu"]
[node name="ChapterSelect" type="OptionButton" parent="Columns/RightSide/TopStuff/Menu"]
margin_right = 168.0
margin_bottom = 35.0
text = "Select chapter..."
[node name="LevelSelect" type="OptionButton" parent="HBoxContainer/RightSide/TopStuff/Menu"]
[node name="LevelSelect" type="OptionButton" parent="Columns/RightSide/TopStuff/Menu"]
margin_left = 173.0
margin_right = 317.0
margin_bottom = 35.0
text = "Select level..."
expand_icon = true
[node name="ReloadButton" type="Button" parent="HBoxContainer/RightSide/TopStuff/Menu"]
[node name="ReloadButton" type="Button" parent="Columns/RightSide/TopStuff/Menu"]
margin_left = 322.0
margin_right = 401.0
margin_bottom = 35.0
@ -120,7 +120,7 @@ __meta__ = {
"_edit_use_anchors_": false
}
[node name="NextLevelButton" type="Button" parent="HBoxContainer/RightSide/TopStuff/Menu"]
[node name="NextLevelButton" type="Button" parent="Columns/RightSide/TopStuff/Menu"]
margin_left = 406.0
margin_right = 516.0
margin_bottom = 35.0
@ -133,13 +133,13 @@ __meta__ = {
"_edit_use_anchors_": false
}
[node name="LevelPanel" type="VBoxContainer" parent="HBoxContainer/RightSide/TopStuff"]
[node name="LevelPanel" type="VBoxContainer" parent="Columns/RightSide/TopStuff"]
margin_top = 40.0
margin_right = 631.0
margin_bottom = 529.0
size_flags_vertical = 3
[node name="LevelName" type="RichTextLabel" parent="HBoxContainer/RightSide/TopStuff/LevelPanel"]
[node name="LevelName" type="RichTextLabel" parent="Columns/RightSide/TopStuff/LevelPanel"]
margin_right = 631.0
margin_bottom = 60.0
rect_min_size = Vector2( 0, 60 )
@ -149,13 +149,13 @@ __meta__ = {
"_edit_use_anchors_": false
}
[node name="Text" type="Control" parent="HBoxContainer/RightSide/TopStuff/LevelPanel"]
[node name="Text" type="Control" parent="Columns/RightSide/TopStuff/LevelPanel"]
margin_top = 65.0
margin_right = 631.0
margin_bottom = 489.0
size_flags_vertical = 3
[node name="LevelDescription" type="RichTextLabel" parent="HBoxContainer/RightSide/TopStuff/LevelPanel/Text"]
[node name="LevelDescription" type="RichTextLabel" parent="Columns/RightSide/TopStuff/LevelPanel/Text"]
anchor_right = 1.0
anchor_bottom = 1.0
size_flags_vertical = 3
@ -166,7 +166,7 @@ __meta__ = {
"_edit_use_anchors_": false
}
[node name="LevelCongrats" type="RichTextLabel" parent="HBoxContainer/RightSide/TopStuff/LevelPanel/Text"]
[node name="LevelCongrats" type="RichTextLabel" parent="Columns/RightSide/TopStuff/LevelPanel/Text"]
visible = false
anchor_right = 1.0
anchor_bottom = 1.0
@ -178,14 +178,14 @@ __meta__ = {
"_edit_use_anchors_": false
}
[node name="Terminal" parent="HBoxContainer/RightSide" instance=ExtResource( 1 )]
[node name="Terminal" parent="Columns/RightSide" instance=ExtResource( 1 )]
anchor_right = 0.0
anchor_bottom = 0.0
margin_top = 541.0
margin_right = 631.0
margin_bottom = 1070.0
size_flags_vertical = 3
repository_path = NodePath("../../Repositories/ActiveRepository")
repository_path = NodePath("../../../Columns/Repositories/ActiveRepository")
[node name="Test" type="Node2D" parent="."]
visible = false
@ -202,8 +202,8 @@ caret_blink = true
__meta__ = {
"_edit_use_anchors_": false
}
[connection signal="button_down" from="HBoxContainer/RightSide/TopStuff/Menu/ChapterSelect" to="." method="repopulate_chapters"]
[connection signal="button_down" from="HBoxContainer/RightSide/TopStuff/Menu/LevelSelect" to="." method="repopulate_levels"]
[connection signal="pressed" from="HBoxContainer/RightSide/TopStuff/Menu/ReloadButton" to="." method="reload_level"]
[connection signal="pressed" from="HBoxContainer/RightSide/TopStuff/Menu/NextLevelButton" to="." method="load_next_level"]
[connection signal="button_down" from="Columns/RightSide/TopStuff/Menu/ChapterSelect" to="." method="repopulate_chapters"]
[connection signal="button_down" from="Columns/RightSide/TopStuff/Menu/LevelSelect" to="." method="repopulate_levels"]
[connection signal="pressed" from="Columns/RightSide/TopStuff/Menu/ReloadButton" to="." method="reload_level"]
[connection signal="pressed" from="Columns/RightSide/TopStuff/Menu/NextLevelButton" to="." method="load_next_level"]
[connection signal="text_entered" from="Test/LineEdit" to="Test" method="send"]

View File

@ -1,10 +1,10 @@
extends Control
onready var index = $VSplitContainer/RepoVis/Index
onready var nodes = $VSplitContainer/RepoVis/Nodes
onready var file_browser = $VSplitContainer/FileBrowser
onready var label_node = $VSplitContainer/RepoVis/Label
onready var simplify_checkbox = $VSplitContainer/RepoVis/SimplifyCheckbox
onready var index = $Rows/RepoVis/Index
onready var nodes = $Rows/RepoVis/Nodes
onready var file_browser = $Rows/FileBrowser
onready var label_node = $Rows/RepoVis/Label
onready var simplify_checkbox = $Rows/RepoVis/SimplifyCheckbox
export var label: String setget set_label
export var path: String setget set_path, get_path

View File

@ -15,12 +15,15 @@ __meta__ = {
"_edit_use_anchors_": false
}
[node name="VSplitContainer" type="VSplitContainer" parent="."]
[node name="Rows" type="VSplitContainer" parent="."]
anchor_right = 1.0
anchor_bottom = 1.0
mouse_filter = 1
__meta__ = {
"_edit_use_anchors_": false
}
[node name="RepoVis" type="Control" parent="VSplitContainer"]
[node name="RepoVis" type="Control" parent="Rows"]
margin_right = 1920.0
margin_bottom = 994.0
mouse_filter = 1
@ -29,7 +32,7 @@ __meta__ = {
"_edit_use_anchors_": false
}
[node name="Label" type="Label" parent="VSplitContainer/RepoVis"]
[node name="Label" type="Label" parent="Rows/RepoVis"]
margin_left = 5.60091
margin_top = -0.518692
margin_right = 204.601
@ -40,7 +43,7 @@ __meta__ = {
"_edit_use_anchors_": false
}
[node name="Index" type="Label" parent="VSplitContainer/RepoVis"]
[node name="Index" type="Label" parent="Rows/RepoVis"]
margin_left = 8.64569
margin_top = 63.8375
margin_right = 359.725
@ -51,7 +54,7 @@ __meta__ = {
"_edit_use_anchors_": false
}
[node name="IndexLabel" type="Label" parent="VSplitContainer/RepoVis"]
[node name="IndexLabel" type="Label" parent="Rows/RepoVis"]
visible = false
margin_left = 21.0
margin_top = 65.0
@ -62,7 +65,7 @@ __meta__ = {
"_edit_use_anchors_": false
}
[node name="Button" type="Button" parent="VSplitContainer/RepoVis"]
[node name="Button" type="Button" parent="Rows/RepoVis"]
visible = false
margin_left = 36.5602
margin_top = 67.9891
@ -73,7 +76,7 @@ __meta__ = {
"_edit_use_anchors_": false
}
[node name="SimplifyCheckbox" type="CheckBox" parent="VSplitContainer/RepoVis"]
[node name="SimplifyCheckbox" type="CheckBox" parent="Rows/RepoVis"]
anchor_left = 1.0
anchor_right = 1.0
margin_left = -208.715
@ -87,7 +90,7 @@ __meta__ = {
"_edit_use_anchors_": false
}
[node name="Nodes" type="Control" parent="VSplitContainer/RepoVis"]
[node name="Nodes" type="Control" parent="Rows/RepoVis"]
anchor_right = 1.0
anchor_bottom = 1.0
mouse_filter = 2
@ -95,7 +98,7 @@ __meta__ = {
"_edit_use_anchors_": false
}
[node name="FileBrowser" parent="VSplitContainer" instance=ExtResource( 4 )]
[node name="FileBrowser" parent="Rows" instance=ExtResource( 4 )]
anchor_right = 0.0
anchor_bottom = 0.0
margin_top = 1006.0
@ -105,5 +108,5 @@ size_flags_vertical = 3
size_flags_stretch_ratio = 0.08
[connection signal="mouse_entered" from="." to="." method="_on_mouse_entered"]
[connection signal="mouse_exited" from="." to="." method="_on_mouse_exited"]
[connection signal="pressed" from="VSplitContainer/RepoVis/Button" to="." method="update_everything"]
[connection signal="toggled" from="VSplitContainer/RepoVis/SimplifyCheckbox" to="." method="simplify_view"]
[connection signal="pressed" from="Rows/RepoVis/Button" to="." method="update_everything"]
[connection signal="toggled" from="Rows/RepoVis/SimplifyCheckbox" to="." method="simplify_view"]

View File

@ -45,7 +45,7 @@ func run(command):
#
# becomes
#
# "'test '"'"'fu'"'"' "bla" blubb
# "'test '"'"'fu'"'"' "bla" blubb"
#
hacky_command = '"\''+hacky_command.replace("'", "'\"'\"'")+'\'"'

View File

@ -6,12 +6,12 @@ var history_position = 0
var git_commands = []
var git_commands_help = []
onready var input = $VBoxContainer/InputLine/Input
onready var output = $VBoxContainer/TopHalf/Output
onready var completions = $VBoxContainer/TopHalf/Completions
onready var input = $Rows/InputLine/Input
onready var output = $Rows/TopHalf/Output
onready var completions = $Rows/TopHalf/Completions
export(NodePath) var repository_path
onready var repository = get_node(repository_path)
onready var command_dropdown = $VBoxContainer/InputLine/CommandDropdown
onready var command_dropdown = $Rows/InputLine/CommandDropdown
onready var main = get_tree().get_root().get_node("Main")
var premade_commands = [

View File

@ -27,19 +27,19 @@ __meta__ = {
"_edit_use_anchors_": false
}
[node name="VBoxContainer" type="VBoxContainer" parent="."]
[node name="Rows" type="VBoxContainer" parent="."]
anchor_right = 1.0
anchor_bottom = 1.0
__meta__ = {
"_edit_use_anchors_": false
}
[node name="TopHalf" type="Control" parent="VBoxContainer"]
[node name="TopHalf" type="Control" parent="Rows"]
margin_right = 1920.0
margin_bottom = 1052.0
size_flags_vertical = 3
[node name="Output" type="RichTextLabel" parent="VBoxContainer/TopHalf"]
[node name="Output" type="RichTextLabel" parent="Rows/TopHalf"]
anchor_right = 1.0
anchor_bottom = 1.0
size_flags_vertical = 3
@ -50,7 +50,7 @@ __meta__ = {
"_edit_use_anchors_": false
}
[node name="Completions" type="Tree" parent="VBoxContainer/TopHalf"]
[node name="Completions" type="Tree" parent="Rows/TopHalf"]
anchor_top = 1.0
anchor_right = 1.0
anchor_bottom = 1.0
@ -61,12 +61,12 @@ __meta__ = {
"_edit_use_anchors_": false
}
[node name="InputLine" type="HBoxContainer" parent="VBoxContainer"]
[node name="InputLine" type="HBoxContainer" parent="Rows"]
margin_top = 1056.0
margin_right = 1920.0
margin_bottom = 1080.0
[node name="Input" type="LineEdit" parent="VBoxContainer/InputLine"]
[node name="Input" type="LineEdit" parent="Rows/InputLine"]
margin_right = 1920.0
margin_bottom = 24.0
size_flags_horizontal = 3
@ -75,7 +75,7 @@ __meta__ = {
"_edit_use_anchors_": false
}
[node name="CommandDropdown" type="MenuButton" parent="VBoxContainer/InputLine"]
[node name="CommandDropdown" type="MenuButton" parent="Rows/InputLine"]
visible = false
margin_left = 1896.0
margin_right = 1920.0
@ -106,8 +106,8 @@ mouse_filter = 1
syntax_highlighting = false
[node name="TCPServer" parent="." instance=ExtResource( 3 )]
[connection signal="item_selected" from="VBoxContainer/TopHalf/Completions" to="." method="_completion_selected"]
[connection signal="text_changed" from="VBoxContainer/InputLine/Input" to="." method="_input_changed"]
[connection signal="text_entered" from="VBoxContainer/InputLine/Input" to="." method="send_command"]
[connection signal="item_selected" from="Rows/TopHalf/Completions" to="." method="_completion_selected"]
[connection signal="text_changed" from="Rows/InputLine/Input" to="." method="_input_changed"]
[connection signal="text_entered" from="Rows/InputLine/Input" to="." method="send_command"]
[connection signal="pressed" from="ClearButton" to="." method="clear"]
[connection signal="data_received" from="TCPServer" to="." method="receive_output"]