public void OnShowThreeButtonDialog() { IGDialogs.ShowThreeBtnDialog("Title", "My awesome message!", "Option 1", () => Debug.Log("Option 1 button clicked!"), "Option 2", () => Debug.Log("Option 2 button clicked!"), "Cancel", () => Debug.Log("Cancel clicked!") ); }
public void ExportFile() { if (_lastPaths.Count == 0) { IGDialogs.ShowOneBtnDialog("Paths list is empty", "Please, import files before exporting", "Ok", () => { }); return; } IGFilePicker.ExportToService(list => { IGDialogs.ShowOneBtnDialog("Success", "File was exported", "Ok", () => { }); }, () => { IGDialogs.ShowOneBtnDialog("Cancelled", "File pick was cancelled", "Ok", () => { }); }, _lastPaths); }
public void PickFile() { IGFilePicker.Import(new[] { "public.data" }, list => { foreach (var path in list) { print(path); _lastPaths.Add(path); } IGDialogs.ShowOneBtnDialog("Success", "File was downloaded", "Ok", () => { }); }, () => { IGDialogs.ShowOneBtnDialog("Cancelled", "File pick was cancelled", "Ok", () => { }); }, true); }
public void OpenFile() { IGFilePicker.Open(new[] { "public.image" }, list => { foreach (var path in list) { print(path); var bytes = File.ReadAllBytes(path); var tex = new Texture2D(2, 2); tex.LoadImage(bytes); image.sprite = SpriteFromTex2D(tex); } }, () => { IGDialogs.ShowOneBtnDialog("Cancelled", "File pick was cancelled", "Ok", () => { }); }, true); }
public void OnShowTwoButtonDialog() { IGDialogs.ShowTwoBtnDialog("Title", "My awesome message!", "Confirm", () => Debug.Log("Confirm button clicked!"), "Cancel", () => Debug.Log("Cancel clicked!")); }
public void OnShowConfirmationDialog() { IGDialogs.ShowOneBtnDialog("العالم العربي", "Message", "Confirm", () => Debug.Log("Button clicked!")); }
public void OnShowInputDialog() { IGDialogs.ShowInputFieldDialog("Title", "Text", "PlaceHolder", "Ok", "Cancel", () => { Debug.Log("InputDialog: Cancel"); }, result => { Debug.Log("InputDialog: " + result); }); }