예제 #1
0
    public void BackToMainMenu()
    {
        if (gameSettings.valueChanged)
        {
            string      title     = "UNSAVED CHANGES";
            string      message   = "There are unsaved changes in the settings. Would you like to apply them first?";
            UnityAction yesAction = () =>
            {
                ApplySettings();
                mainMenuHandler.GoToMainMenu();
                Destroy(mainMenuHandler.dialogInstance);
                MainMenuHandler.EnableInputReceive();
            };
            UnityAction noAction = () =>
            {
                ResetSettings();
                mainMenuHandler.GoToMainMenu();
                Destroy(mainMenuHandler.dialogInstance);
                MainMenuHandler.EnableInputReceive();
            };

            mainMenuHandler.ShowConfirmDialog(title, message, yesAction, noAction);
        }
        else
        {
            mainMenuHandler.GoToMainMenu();
        }
    }
예제 #2
0
파일: MenuMain.cs 프로젝트: datnewb/Kartus
    public void ExitButton()
    {
        string      title     = "EXIT";
        string      message   = "Are you sure you want to quit?";
        UnityAction yesAction = ExitConfirm;
        UnityAction noAction  = ExitDecline;

        mainMenuHandler.ShowConfirmDialog(title, message, yesAction, noAction);
    }
예제 #3
0
    public void BackButton()
    {
        string title   = "LEAVE GAME";
        string message = "Do you really want to leave this game?";

        if (Network.isServer)
        {
            message += " The server will be closed and all other players will automatically be kicked out of the server.";
        }
        UnityAction yesAction = BackConfirm;
        UnityAction noAction  = BackDecline;

        mainMenuHandler.ShowConfirmDialog(title, message, yesAction, noAction);
    }