Ejemplo n.º 1
0
    protected void LockPressed()
    {
        if (PlayerData.GlobalData.IsLocked)
        {
            ModalDialog.ShowInputModal(
                mode: ModalDialog.Mode.InputConfirmCancel,
                headerText: "Enter Code",
                bodyText: "Enter the unlock code.\n\n" +
                "Note: This enables experimental features.\n" +
                "The Code is 3141",
                inputCallback: LockSubmit);
        }
        else
        {
            PlayerData.GlobalData.IsLocked = true;

            switch (currentMode)
            {
            case SettingPanelMode.General:
                generalSettingsMenu.LockStateChanged();
                break;

            case SettingPanelMode.UserSelect:
                userIDMenu.LockStateChanged();
                break;

            default:
                Debug.LogError($"Unexpected mode: {currentMode}");
                break;
            }

            UpdateUIForMode(currentMode);
        }
    }
Ejemplo n.º 2
0
 private void CreateUserButtonPressed()
 {
     ModalDialog.ShowInputModal(
         mode: ModalDialog.Mode.InputConfirmCancel,
         headerText: "Creating New User",
         bodyText: "New User Name:",
         inputCallback: UserNameSubmitted);
 }