add basic bottom menu
This commit is contained in:
parent
eaf97cb4d3
commit
786f61e644
@ -10,6 +10,7 @@ anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
script = ExtResource("1_qbiqn")
|
||||
debug = true
|
||||
|
||||
[node name="MarginContainer" type="MarginContainer" parent="."]
|
||||
layout_mode = 1
|
||||
@ -23,26 +24,60 @@ theme_override_constants/margin_top = 10
|
||||
theme_override_constants/margin_right = 10
|
||||
theme_override_constants/margin_bottom = 10
|
||||
|
||||
[node name="HBoxContainer" type="HBoxContainer" parent="MarginContainer"]
|
||||
[node name="Menus" type="VBoxContainer" parent="MarginContainer"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 4
|
||||
size_flags_vertical = 8
|
||||
|
||||
[node name="ButtonInstantiate" type="Button" parent="MarginContainer/HBoxContainer"]
|
||||
[node name="DebugMenu" type="HBoxContainer" parent="MarginContainer/Menus"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 4
|
||||
size_flags_vertical = 8
|
||||
|
||||
[node name="ButtonInstantiate" type="Button" parent="MarginContainer/Menus/DebugMenu"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 4
|
||||
size_flags_vertical = 8
|
||||
text = "Instantiate Enemy"
|
||||
|
||||
[node name="TouchScreenButton" type="TouchScreenButton" parent="MarginContainer/HBoxContainer/ButtonInstantiate"]
|
||||
[node name="TouchScreenButton" type="TouchScreenButton" parent="MarginContainer/Menus/DebugMenu/ButtonInstantiate"]
|
||||
|
||||
[node name="ButtonExit" type="Button" parent="MarginContainer/HBoxContainer"]
|
||||
[node name="ButtonExit" type="Button" parent="MarginContainer/Menus/DebugMenu"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 4
|
||||
size_flags_vertical = 8
|
||||
text = "Exit"
|
||||
|
||||
[node name="TouchScreenButton" type="TouchScreenButton" parent="MarginContainer/HBoxContainer/ButtonExit"]
|
||||
[node name="TouchScreenButton" type="TouchScreenButton" parent="MarginContainer/Menus/DebugMenu/ButtonExit"]
|
||||
|
||||
[connection signal="pressed" from="MarginContainer/HBoxContainer/ButtonInstantiate" to="." method="_on_button_instantiate_pressed"]
|
||||
[connection signal="pressed" from="MarginContainer/HBoxContainer/ButtonExit" to="." method="_on_button_exit_pressed"]
|
||||
[node name="MenuButtons" type="HBoxContainer" parent="MarginContainer/Menus"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 4
|
||||
size_flags_vertical = 8
|
||||
|
||||
[node name="MainMenuButton" type="Button" parent="MarginContainer/Menus/MenuButtons"]
|
||||
layout_mode = 2
|
||||
text = "Menu"
|
||||
|
||||
[node name="MapMenuButton" type="Button" parent="MarginContainer/Menus/MenuButtons"]
|
||||
layout_mode = 2
|
||||
text = "Map"
|
||||
|
||||
[node name="SkillsMenuButton" type="Button" parent="MarginContainer/Menus/MenuButtons"]
|
||||
layout_mode = 2
|
||||
text = "Skills"
|
||||
|
||||
[node name="InvMenuButton" type="Button" parent="MarginContainer/Menus/MenuButtons"]
|
||||
layout_mode = 2
|
||||
text = "Inventory"
|
||||
|
||||
[node name="LogMenuButton" type="Button" parent="MarginContainer/Menus/MenuButtons"]
|
||||
layout_mode = 2
|
||||
text = "Log"
|
||||
|
||||
[node name="CraftMenuButton" type="Button" parent="MarginContainer/Menus/MenuButtons"]
|
||||
layout_mode = 2
|
||||
text = "Crafting"
|
||||
|
||||
[connection signal="pressed" from="MarginContainer/Menus/DebugMenu/ButtonInstantiate" to="." method="_on_button_instantiate_pressed"]
|
||||
[connection signal="pressed" from="MarginContainer/Menus/DebugMenu/ButtonExit" to="." method="_on_button_exit_pressed"]
|
||||
|
@ -2,6 +2,7 @@ extends Control
|
||||
|
||||
|
||||
var enemies = Array()
|
||||
@export var debug = false
|
||||
|
||||
|
||||
func _on_button_instantiate_pressed() -> void:
|
||||
@ -30,3 +31,6 @@ func _on_button_instantiate_pressed() -> void:
|
||||
func _on_button_exit_pressed() -> void:
|
||||
get_tree().quit()
|
||||
|
||||
func _ready() -> void:
|
||||
if not debug:
|
||||
$MarginContainer/Menus/DebugMenu.hide()
|
||||
|
Loading…
Reference in New Issue
Block a user