/* * author: mark joshwel * date: 11/8/2024 * description: option menu script for handling credits menu button functions */ using Unity.Mathematics; using UnityEngine; using UnityEngine.Audio; using UnityEngine.Serialization; using UnityEngine.UIElements; /// /// class managing the credits menu and button function invocations /// public class ScreenOptionsMenu : CommonMenu { public AudioMixer mixer; /// /// button to return to the main menu /// public Button ButtonReturn; /// /// slider for master (music + sfx) volume /// public Slider SliderAudioMaster; /// /// slider for music volume /// public Slider SliderAudioMusic; /// /// slider for sfx volume /// public Slider SliderAudioSfx; /// /// function to associate a display state with the menu, /// and subscribe button events to their respective functions /// public override void OnEnable() { // set the associated state and call the base OnEnable associatedState = GameManager.DisplayState.ScreenOptionsMenu; base.OnEnable(); // get the start button from the ui root and subscribe appropriate functions ButtonReturn = UI.Q