Added Load Level Item List with back button that works
This commit is contained in:
@ -48,7 +48,25 @@ text = "Settings"
|
|||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
text = "Exit"
|
text = "Exit"
|
||||||
|
|
||||||
|
[node name="ItemList" type="ItemList" parent="."]
|
||||||
|
visible = false
|
||||||
|
layout_mode = 1
|
||||||
|
anchors_preset = 8
|
||||||
|
anchor_left = 0.5
|
||||||
|
anchor_top = 0.5
|
||||||
|
anchor_right = 0.5
|
||||||
|
anchor_bottom = 0.5
|
||||||
|
offset_left = -262.0
|
||||||
|
offset_top = -352.0
|
||||||
|
offset_right = 262.0
|
||||||
|
offset_bottom = 352.0
|
||||||
|
grow_horizontal = 2
|
||||||
|
grow_vertical = 2
|
||||||
|
item_count = 1
|
||||||
|
item_0/text = "Go Back"
|
||||||
|
|
||||||
[connection signal="pressed" from="VBoxContainer/Start" to="." method="_on_start_pressed"]
|
[connection signal="pressed" from="VBoxContainer/Start" to="." method="_on_start_pressed"]
|
||||||
[connection signal="pressed" from="VBoxContainer/Load Level" to="." method="_on_load_level_pressed"]
|
[connection signal="pressed" from="VBoxContainer/Load Level" to="." method="_on_load_level_pressed"]
|
||||||
[connection signal="pressed" from="VBoxContainer/Settings" to="." method="_on_settings_pressed"]
|
[connection signal="pressed" from="VBoxContainer/Settings" to="." method="_on_settings_pressed"]
|
||||||
[connection signal="pressed" from="VBoxContainer/Exit" to="." method="_on_exit_pressed"]
|
[connection signal="pressed" from="VBoxContainer/Exit" to="." method="_on_exit_pressed"]
|
||||||
|
[connection signal="item_clicked" from="ItemList" to="." method="_on_item_list_item_clicked"]
|
||||||
|
|||||||
@ -19,4 +19,10 @@ func _on_settings_pressed():
|
|||||||
|
|
||||||
|
|
||||||
func _on_load_level_pressed():
|
func _on_load_level_pressed():
|
||||||
pass # Replace with function body.
|
$VBoxContainer.hide()
|
||||||
|
$ItemList.show()
|
||||||
|
|
||||||
|
func _on_item_list_item_clicked(index, at_position, mouse_button_index):
|
||||||
|
if index == 0:
|
||||||
|
$ItemList.hide()
|
||||||
|
$VBoxContainer.show()
|
||||||
|
|||||||
Reference in New Issue
Block a user