public void OnReturnToMenuClicked()
 {
     if (IsListeningToEvents == true)
     {
         // FIXME: Notify the player that they'll lose their unsaved progress.
         // Transition to the menu
         SceneChanger.LoadMainMenu();
         Hide();
     }
 }
        protected override void OnStateChanged(VisibilityState from, VisibilityState to)
        {
            base.OnStateChanged(from, to);

            // Remove the binding to Singleton's update function
            StopListeningToUpdate();

            if (to == VisibilityState.Visible)
            {
                // If menu is becoming visible
                // Bind to Singleton's update function
                checkAnyKey = new System.Action <float>(CheckForAnyKey);
                Singleton.Instance.OnUpdate += checkAnyKey;
            }
            else if (to == VisibilityState.Hidden)
            {
                // If menu is hidden
                // Remove the binding to Singleton's update function
                StopListeningToUpdate();

                // Return to the menu
                SceneChanger.LoadMainMenu();
            }
        }