Skip to content

Commit

Permalink
Merge pull request #146 from ac-arcana/main
Browse files Browse the repository at this point in the history
Pause Menu Style Changes
  • Loading branch information
Phazorknight authored Apr 4, 2024
2 parents f84ba58 + a05fca8 commit b199c53
Showing 1 changed file with 17 additions and 11 deletions.
28 changes: 17 additions & 11 deletions COGITO/EasyMenus/Scripts/pause_menu_controller.gd
Original file line number Diff line number Diff line change
@@ -1,21 +1,29 @@
class_name CogitoPauseMenu
extends Control
## This class controls the pause menu which can be found here:
## res://COGITO/EasyMenus/Scenes/PauseMenu.tscn
## You can override this class to add buttons to your pause menu
## look at the function open_options_menu for an example of showing a submenu
## also remember to add a hide call for your menu in _input

signal resume
signal back_to_main_pressed

#region Variables
@export var nodes_to_focus: Array[Control]
@export var sound_hover : AudioStream
@export var sound_click : AudioStream

var playback : AudioStreamPlaybackPolyphonic
var temp_screenshot : Image

@onready var resume_game_button: Button = %ResumeGameButton
@onready var save_button: CogitoUiButton = %SaveButton
@onready var load_button: CogitoUiButton = %LoadButton
@onready var label_active_slot: Label = %Label_ActiveSlot
@onready var options_tab_menu: OptionsTabMenu = $Content/OptionsTabMenu
@onready var game_menu: MarginContainer = $Content/GameMenu

@export var nodes_to_focus: Array[Control]

#region UI AUDIO
@export var sound_hover : AudioStream
@export var sound_click : AudioStream
var playback : AudioStreamPlaybackPolyphonic
var temp_screenshot : Image
#endregion


func _enter_tree() -> void:
Expand Down Expand Up @@ -49,7 +57,6 @@ func _play_hover() -> void:

func _play_pressed() -> void:
playback.play_stream(sound_click, 0, 0, 1)
#endregion


func open_pause_menu():
Expand Down Expand Up @@ -130,7 +137,6 @@ func _input(event):
close_pause_menu()



func _on_save_button_pressed() -> void:
CogitoSceneManager._current_scene_name = get_tree().get_current_scene().get_name()
CogitoSceneManager._current_scene_path = get_tree().current_scene.scene_file_path
Expand All @@ -139,7 +145,7 @@ func _on_save_button_pressed() -> void:
CogitoSceneManager.save_scene_state(CogitoSceneManager._current_scene_name,CogitoSceneManager._active_slot)

_on_resume_game_button_pressed()


func _on_load_button_pressed() -> void:
print("LOAD BUTTON PRESSED")
Expand Down

0 comments on commit b199c53

Please sign in to comment.