commit 90580c6604cc7fd47820e20ab483789ab9bfcc59
parent f23f3e45730566d2dbef9615b06964c6aededa31
Author: Yuval Langer <yuvallangerontheroad@gmail.com>
Date: Mon, 20 Sep 2021 21:56:03 +0300
Level selection a bit less of a mess. It is still a mess.
Diffstat:
2 files changed, 62 insertions(+), 3 deletions(-)
diff --git a/LevelSelection.gd b/LevelSelection.gd
@@ -21,3 +21,7 @@ func _on_ItemList_item_selected(index: int) -> void:
var level_path: String = item_text_to_level_path[item_text]
print_debug(index, " ", item_text, " ", level_path)
get_tree().change_scene(level_path)
+
+
+func _on_Button_pressed() -> void:
+ get_tree().change_scene("res://Level1.tscn")
diff --git a/LevelSelection.tscn b/LevelSelection.tscn
@@ -12,7 +12,7 @@ __meta__ = {
"_edit_use_anchors_": false
}
-[node name="VBoxContainer" type="VBoxContainer" parent="."]
+[node name="HBoxContainer" type="HBoxContainer" parent="."]
anchor_right = 1.0
anchor_bottom = 1.0
size_flags_horizontal = 3
@@ -21,10 +21,65 @@ __meta__ = {
"_edit_use_anchors_": false
}
-[node name="ItemList" type="ItemList" parent="VBoxContainer"]
+[node name="Label" type="Label" parent="HBoxContainer"]
+margin_right = 510.0
+margin_bottom = 600.0
+size_flags_horizontal = 3
+size_flags_vertical = 3
+text = "Select level:"
+align = 1
+valign = 1
+
+[node name="VBoxContainer" type="VBoxContainer" parent="HBoxContainer"]
+margin_left = 514.0
margin_right = 1024.0
margin_bottom = 600.0
size_flags_horizontal = 3
size_flags_vertical = 3
+__meta__ = {
+"_edit_use_anchors_": false
+}
+
+[node name="ItemList" type="ItemList" parent="HBoxContainer/VBoxContainer"]
+visible = false
+margin_right = 510.0
+margin_bottom = 298.0
+size_flags_horizontal = 3
+size_flags_vertical = 3
items = [ "Vanilla Sky", null, false ]
-[connection signal="item_selected" from="VBoxContainer/ItemList" to="." method="_on_ItemList_item_selected"]
+
+[node name="Button" type="Button" parent="HBoxContainer/VBoxContainer"]
+margin_right = 510.0
+margin_bottom = 147.0
+size_flags_horizontal = 3
+size_flags_vertical = 3
+text = "Vanilla Sky (only one in existence!)"
+
+[node name="Button2" type="Button" parent="HBoxContainer/VBoxContainer"]
+margin_top = 151.0
+margin_right = 510.0
+margin_bottom = 298.0
+size_flags_horizontal = 3
+size_flags_vertical = 3
+text = "Space Walk (putative)"
+
+[node name="Button3" type="Button" parent="HBoxContainer/VBoxContainer"]
+margin_top = 302.0
+margin_right = 510.0
+margin_bottom = 449.0
+size_flags_horizontal = 3
+size_flags_vertical = 3
+text = "A Skip And A Jump (putative)"
+
+[node name="Button4" type="Button" parent="HBoxContainer/VBoxContainer"]
+margin_top = 453.0
+margin_right = 510.0
+margin_bottom = 600.0
+size_flags_horizontal = 3
+size_flags_vertical = 3
+text = "Space Station (putative)"
+[connection signal="item_selected" from="HBoxContainer/VBoxContainer/ItemList" to="." method="_on_ItemList_item_selected"]
+[connection signal="pressed" from="HBoxContainer/VBoxContainer/Button" to="." method="_on_Button_pressed"]
+[connection signal="pressed" from="HBoxContainer/VBoxContainer/Button2" to="." method="_on_Button_pressed"]
+[connection signal="pressed" from="HBoxContainer/VBoxContainer/Button3" to="." method="_on_Button_pressed"]
+[connection signal="pressed" from="HBoxContainer/VBoxContainer/Button4" to="." method="_on_Button_pressed"]