big work
This commit is contained in:
+17
-4
@@ -19,9 +19,12 @@ func _ready() -> void:
|
||||
|
||||
#Connecting signals
|
||||
menu_button.pressed.connect(func():
|
||||
submenu.show()
|
||||
ui_main.masks.mask.show()
|
||||
ui_main.in_title_screen = false
|
||||
if UI.in_title_screen == false and submenu.is_visible_in_tree() == false:
|
||||
submenu.show()
|
||||
ui_main.masks.mask.show()
|
||||
elif UI.in_title_screen == false and submenu.is_visible_in_tree():
|
||||
reset()
|
||||
ui_main.masks.mask.hide()
|
||||
)
|
||||
submenu.resume.pressed.connect(func():
|
||||
reset()
|
||||
@@ -38,7 +41,17 @@ func _ready() -> void:
|
||||
load.load_slot[i].pressed.connect(self._on_load_slot_pressed.bind(i))
|
||||
load.load_slot[0].pressed.connect(self._on_load_slot_pressed.bind(0)) #Autosaveslot can be loaded but not saved upon
|
||||
|
||||
|
||||
|
||||
#Opens the submenu when the escape key is pressed
|
||||
func _unhandled_input(event: InputEvent) -> void:
|
||||
if event.is_action_pressed("ui_cancel") and UI.in_title_screen == false and submenu.is_visible_in_tree() == false:
|
||||
submenu.show()
|
||||
ui_main.masks.mask.show()
|
||||
elif event.is_action_pressed("ui_cancel") and UI.in_title_screen == false and submenu.is_visible_in_tree():
|
||||
reset()
|
||||
ui_main.masks.mask.hide()
|
||||
|
||||
|
||||
#Emits save_slot signal
|
||||
func _on_save_slot_pressed(save_slot_number: int):
|
||||
|
||||
|
||||
+1
-1
@@ -23,7 +23,7 @@ signal text_value_changed
|
||||
signal auto_value_changed
|
||||
|
||||
#Boolean to differentiate in-game UI from title_screen UI
|
||||
var in_title_screen = false
|
||||
var in_title_screen = true
|
||||
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
|
||||
@@ -273,6 +273,7 @@ theme = SubResource("Theme_h6tq4")
|
||||
script = ExtResource("4_s3gqk")
|
||||
|
||||
[node name="Submenu" type="PanelContainer" parent="PauseMenu"]
|
||||
visible = false
|
||||
layout_mode = 1
|
||||
anchors_preset = 8
|
||||
anchor_left = 0.5
|
||||
|
||||
Reference in New Issue
Block a user