// Dialog Button click event public void OnDialogInfo() { NativeDialog.OpenDialog("Info popup", "Welcome To Native Popup", "Ok", () => { DebugLog("OK Button pressed"); }); }
public void OnDialogConfirm() { NativeDialog.OpenDialog("Confirm popup", "Do you wants about app?", "Yes", "No", () => { DebugLog("Yes Button pressed"); }, () => { DebugLog("No Button pressed"); }); }
public void ShowChangeNameValidationError(string message) { #if UNITY_EDITOR Debug.Log("Show change name validation error dialog"); #else NativeDialog.OpenDialog(_config.ChangeNameValidationErrorTitle, message, _config.OkText, () => { }); #endif }
public void ShowChangeNameSuccessDialog() { #if UNITY_EDITOR Debug.Log("Show change name success dialog"); #else NativeDialog.OpenDialog(_config.ChangeNameSuccessTitle, _config.ChangeNameSuccessBody, _config.OkText, () => { }); #endif }
public void ShowScoreUpdateErrorDialog() { #if UNITY_EDITOR Debug.Log("Show score update error dialog"); #else NativeDialog.OpenDialog(_config.ScoreUpdateErrorTitle, _config.ScoreUpdateErrorBody, _config.OkText, () => { }); #endif }
public void ShowUpdateRequestDialog(string title, string message, UnityAction onOk) { #if UNITY_EDITOR Debug.Log("Show update request dialog: "); onOk?.Invoke(); #else NativeDialog.OpenDialog(title, message, _config.UpdateButton, () => { onOk?.Invoke(); }); #endif }
public void ShowMaintenanceDialog(string title, string message, UnityAction onOk) { #if UNITY_EDITOR Debug.Log("Show maintenance dialog: " + title + message); onOk?.Invoke(); #else NativeDialog.OpenDialog(title, message, _config.OkText, () => { onOk?.Invoke(); }); #endif }
public void ShowConnectionErrorDialog(UnityAction onRetry, UnityAction onCancel) { #if UNITY_EDITOR Debug.Log("Show connection error dialog"); onRetry?.Invoke(); #else NativeDialog.OpenDialog(_config.ConnectionErrorTitle, _config.ConnectionErrorBody, _config.RetryText, _config.CancelText, () => { onRetry?.Invoke(); }, () => { onCancel?.Invoke(); }); #endif }
public void OnDialogNeutral() { NativeDialog.OpenDialog("Like this game?", "Please rate to support future updates!", "Rate app", "later", "No, thanks", () => { DebugLog("Rate Button pressed"); }, () => { DebugLog("Later Button pressed"); }, () => { DebugLog("No Button pressed"); }); }