private void ShowKeystoreView() { keystoreView.SetActive(true); InputField keystoreInput = keystoreView.transform.Find("KeystoreInputField").GetComponent <InputField>(); InputField pwdInput = keystoreView.transform.Find("PwdInputField").GetComponent <InputField>(); InputField nameInput = keystoreView.transform.Find("NameInputField").GetComponent <InputField>(); Button btnPasteKeystore = keystoreView.transform.Find("BtnPasteKeystore").GetComponent <Button>(); AddButtonClickEvent(btnPasteKeystore, delegate(){ keystoreInput.text = UniClipboard.GetText(); }); Button btnImport = keystoreView.transform.Find("BtnImport").GetComponent <Button>(); AddButtonClickEvent(btnImport, delegate() { if (string.IsNullOrEmpty(keystoreInput.text) || string.IsNullOrEmpty(pwdInput.text) || string.IsNullOrEmpty(nameInput.text)) { ShowMessageView("请输入全部信息"); return; } UnityEngine.Debug.Log(keystoreInput.text + "\n" + pwdInput.text); // 在子线程中执行, 开协程检查执行结果 LoadKeystoreInSubThread(keystoreInput.text, pwdInput.text, nameInput.text); StartCoroutine(WaitForLoadKeystore()); }); Button btnClose = keystoreView.transform.Find("BtnClose").GetComponent <Button>(); AddButtonClickEvent(btnClose, delegate() { keystoreView.SetActive(false); ShowImportView(); }); }
public void Paste() { if (urlInput.interactable) { urlInput.text = UniClipboard.GetText(); } }
void ShowGUI(int windowID) { GUI.Label(new Rect(60, 80, 300, 100), "Your Code for this circuit : " + generalCode); if (GUI.Button(new Rect(60, 150, 75, 30), "OK")) { showPopUp = false; } if (GUI.Button(new Rect(180, 150, 75, 30), "Copy")) { UniClipboard.SetText(generalCode); } if (GUI.Button(new Rect(50, 200, 75, 30), "Save1")) { SaveSystem.instance.saveCode = generalCode; SaveSystem.instance.Save(1); } if (GUI.Button(new Rect(150, 200, 75, 30), "Save2")) { SaveSystem.instance.saveCode = generalCode; SaveSystem.instance.Save(2); } if (GUI.Button(new Rect(250, 200, 75, 30), "Save3")) { SaveSystem.instance.saveCode = generalCode; SaveSystem.instance.Save(3); } }
private void DrawContentGUI(string label, string content) { EditorLayoutTools.DrawLabelWithBackground(label, new Color(0.3f, 0.3f, 0.5f), new Color(0.8f, 0.8f, 0.8f, 0.8f)); using (new EditorGUILayout.HorizontalScope()) { using (new EditorGUILayout.VerticalScope()) { if (GUILayout.Button("copy", GUILayout.Width(45f), GUILayout.Height(18f))) { UniClipboard.SetText(content); } GUILayout.Space(2f); } var textStyle = new GUIStyle(); var textSize = textStyle.CalcSize(new GUIContent(content)); var originLabelWidth = EditorLayoutTools.SetLabelWidth(textSize.x); GUILayout.Label(content, GUILayout.Height(20f)); EditorLayoutTools.SetLabelWidth(originLabelWidth); GUILayout.FlexibleSpace(); } }
public void LoadSettingsFromClipboard() { string clipboardText = UniClipboard.GetText(); LoadSettingsFromJSON(clipboardText, out sliderData); SetSliderToData(sliderData); }
public void CopyLink() { #if UNITY_IOS UniClipboard.SetText(Constants.ShareURLLink(Constants.ShareCodes.CopyLink)); #endif #if UNITY_ANDROID UniClipboard.SetText(Constants.ShareURLLink(Constants.ShareCodes.CopyLink)); #endif if (!Debug.isDebugBuild) { Flurry.Flurry.Instance.LogEvent("Share_CopyLink"); Fabric.Answers.Answers.LogInvite("CopyLink"); Fabric.Answers.Answers.LogShare("CopyLink", contentId: "Invite"); } DialogManager.Instance.Show(prefabName: "GeneralMessageOkButton", title: LocaliseText.Get("Invite.CopyLinkTitle"), text: LocaliseText.Get("Invite.CopyLinkText"), dialogButtons: DialogInstance.DialogButtonsType.Ok, doneCallback: (DialogInstance dialog) => { #if UNITY_EDITOR InviteBonusCoins(); #endif }); }
private void ShowKeystoreView() { ViewManager.ReplaceView(keystoreView, gameObject.name); InputField keystoreInput = keystoreView.transform.Find("KeystoreInputField").GetComponent <InputField>(); InputField pwdInput = keystoreView.transform.Find("PwdInputField").GetComponent <InputField>(); InputField nameInput = keystoreView.transform.Find("NameInputField").GetComponent <InputField>(); Button btnPasteKeystore = keystoreView.transform.Find("BtnPasteKeystore").GetComponent <Button>(); Utils.AddButtonClickEvent(btnPasteKeystore, delegate(){ keystoreInput.text = UniClipboard.GetText(); }); Button btnImport = keystoreView.transform.Find("BtnImport").GetComponent <Button>(); Utils.AddButtonClickEvent(btnImport, delegate() { if (string.IsNullOrEmpty(keystoreInput.text) || string.IsNullOrEmpty(pwdInput.text) || string.IsNullOrEmpty(nameInput.text)) { ViewManager.ShowMessageBox("请输入全部信息"); return; } ShowWaitingView(ImportAccountTimeOut); NotificationCenter.DefaultCenter().AddObserver("KeystoreLoaded", KeystoreLoaded); AccountManager.Instance.LoadWalletFromKeystore(keystoreInput.text, nameInput.text, pwdInput.text); }); Button btnClose = keystoreView.transform.Find("BtnClose").GetComponent <Button>(); Utils.AddButtonClickEvent(btnClose, delegate() { ShowImportView(); }); }
private void OnEnable() { if (_input == null) { _input = GetComponent <InputField>(); } var message = JsonUtility.ToJson(songsManager.CurrentSong); var bytes = Encoding.UTF8.GetBytes(message); _input.text = _deeplink + Convert.ToBase64String(bytes); UniClipboard.SetText(_input.text); //var encoded = new Texture2D(256, 256); //var color32 = Encode(message, encoded.width, encoded.height); //encoded.SetPixels32(color32); //encoded.Apply(); //if(_rawImage == null) //{ // _rawImage = GetComponent<RawImage>(); //} //_rawImage.texture = encoded; }
//private GameObject gameObject; void Start() { string clipBoardValue = UniClipboard.GetText(); Splash.tourId = clipBoardValue; //Splash.tourId = "4"; DownloadVideo(constants.GETVIDEOSNAME + Splash.tourId); }
public void copy() { //int linkmode = (int)GameManager.GameMode; UniClipboard.SetText("http://www.noranapps.com/ofl.php?mode="); //UniClipboard.GetText(); Debug.Log(UniClipboard.GetText() + "1234567"); showToast("Link Copied", 2); }
/// <summary> /// Copies the database key to clipboard and returns it /// </summary> /// <returns></returns> public string OnShare() { if (!Active) { return(null); } UniClipboard.SetText(m_buildSM.CurrentTrackData.m_dbKey); return(m_buildSM.CurrentTrackData.m_dbKey); }
IEnumerator copyIDAndMessage() { UniClipboard.SetText(UserData.UserPlayFabId); AndroidSet.instance.ShowToast("ID 복사 완료"); yield return(new WaitForSeconds(2f)); AndroidSet.instance.CancelToast(); }
public void Paste() { statusText.text = ""; string id = UniClipboard.GetText(); id = id.Replace(System.Environment.NewLine, ""); calibrationCodeText.text = id; AryzonSettings.Instance.RetrieveSettingsForCode(id); statusText.text = "Loading your personal settings.."; }
public void CopyCoordinates() { UniClipboard.SetText( string.Format( "{0}, {1}", latitudeText.text, longtitudeText.text)); ShowMessage("Coordinates copied to clipboard"); }
IEnumerator Holding() { yield return(new WaitForSeconds(HoldTime)); if (_holding) { _holding = false; _inputField.text = UniClipboard.GetText(); } }
public void Share() { var shareText = messageText.text; #if (UNITY_ANDROID || UNITY_IOS) && !UNITY_EDITOR (new NativeShare()).SetText(shareText).Share(); #else UniClipboard.SetText(shareText); #endif }
public void Share() { var shareText = textOutputArea.text; #if (UNITY_ANDROID || UNITY_IOS) && !UNITY_EDITOR (new NativeShare()).SetText(shareText).Share(); #else UniClipboard.SetText(shareText); CardGameManager.Instance.Messenger.Show(DeckCopiedMessage); #endif }
public void Share() { string shareText = GetDeckText(); #if (UNITY_ANDROID || UNITY_IOS) && !UNITY_EDITOR (new NativeShare()).SetText(shareText).Share(); #else UniClipboard.SetText(shareText); CardGameManager.Instance.Messenger.Show(DeckSaveMenu.DeckCopiedMessage); #endif }
public void CopySettingsToClipboard() { string clipboardText = ""; List <DebugSlider.JSONData> sliderJsons = new List <DebugSlider.JSONData>(); for (int i = 0; i < sliders.Count; i++) { sliderJsons.Add(sliders[i].GetJSON); } sliderData = new SliderData(sliderJsons); clipboardText = JsonUtility.ToJson(sliderData); UnityEngine.Debug.Log(clipboardText); UniClipboard.SetText(clipboardText); }
public void SubmitCode() { if (!isWindow) { return; } Close(); if (copyMode) { UniClipboard.SetText(inputField.text); } SingleTon.instance.dollPresetList.presets[0] .DataToGrid(DataManager.Decrypt(inputField.text)); }
// Use this for initialization void Start() { disableVrMtthod(); string clipBoardValue = UniClipboard.GetText(); if (clipBoardValue != null) { //EditorGUIUtility //Field.text = GUIUtility.systemCopyBuffer; Field.text = clipBoardValue; } else { textVar.text = "Press Vr button again from website"; } }
private void ShowWordsImportView() { wordsImportView.SetActive(true); InputField wordsInput = wordsImportView.transform.Find("WordsInputField").GetComponent <InputField>(); InputField pwdInput = wordsImportView.transform.Find("PwdInputField").GetComponent <InputField>(); InputField nameInput = wordsImportView.transform.Find("NameInputField").GetComponent <InputField>(); InputField pwdConfirmInput = wordsImportView.transform.Find("PwdConfirmInputField").GetComponent <InputField>(); Button btnPasteWords = wordsImportView.transform.Find("BtnPasteWords").GetComponent <Button>(); AddButtonClickEvent(btnPasteWords, delegate(){ wordsInput.text = UniClipboard.GetText(); }); Button btnImport = wordsImportView.transform.Find("BtnImport").GetComponent <Button>(); AddButtonClickEvent(btnImport, delegate() { if (string.IsNullOrEmpty(wordsInput.text) || string.IsNullOrEmpty(pwdInput.text) || string.IsNullOrEmpty(nameInput.text)) { ShowMessageView("请输入全部信息"); return; } if (pwdInput.text != pwdConfirmInput.text) { ShowMessageView("两次输入密码不一致"); return; } Wallet wallet = new Wallet(wordsInput.text); mPrivateKeyString = wallet.PrivateKeyString; mPrivateKeyBytes = wallet.PrivateKeyBytes; mAddress = wallet.PublicAddress; mNickName = nameInput.text; mWords = wallet.Words; mPassword = pwdInput.text; wordsImportView.SetActive(false); // 子线程里生成keystore GenerateKeystoreInSubThread(); CheckKeystoreInited(); }); Button btnClose = wordsImportView.transform.Find("BtnClose").GetComponent <Button>(); AddButtonClickEvent(btnClose, delegate() { wordsImportView.SetActive(false); ShowImportView(); }); }
public void Share() { try { var shareText = File.ReadAllText(_selectedFilePath); #if (UNITY_ANDROID || UNITY_IOS) && !UNITY_EDITOR (new NativeShare()).SetText(shareText).Share(); #else UniClipboard.SetText(shareText); CardGameManager.Instance.Messenger.Show(DeckSaveMenu.DeckCopiedMessage); #endif } catch (Exception e) { Debug.LogError(DeckLoadErrorMessage + e.Message); CardGameManager.Instance.Messenger.Show(DeckLoadErrorMessage + e.Message); } }
public void PasteCode() { if (isWindow) { return; } Open(); copyMode = false; string clipBoardText = UniClipboard.GetText(); if (clipBoardText.Length != 88) { inputField.text = null; return; } inputField.text = clipBoardText; }
public void OnGUI() { GUIStyle style = new GUIStyle(GUI.skin.button); style.fontSize = 30; var width = Screen.width; var height = Screen.height; var logoWidth = width * 3 / 4; var logoHeight = height / 4; GUI.Box(new Rect(width / 2 - logoWidth / 2, height / 4, logoWidth, logoHeight), logo); var buttonWidth = width / 7; var buttonHeight = height / 15; Debug.Log(style); var play = GUI.Button(new Rect(width / 2 - buttonWidth / 2, height * 5 / 8, buttonWidth, buttonHeight), "Scan QR Code", style); if (play) { SceneManager.LoadScene("QRCode"); return; } var tryMe = GUI.Button(new Rect(width / 2 - buttonWidth / 2, height * 6 / 8, buttonWidth, buttonHeight), "Try Me", style); if (tryMe) { SceneManager.LoadScene("LoadData"); return; } var url = GUI.Button(new Rect(width / 2 - buttonWidth / 2, height * 7 / 8, buttonWidth, buttonHeight), "Clipboard", style); if (url) { StaticReplayScript.URL = UniClipboard.GetText(); SceneManager.LoadScene("LoadData"); } }
private void ShowBackupView(BackupType backupType) { ViewManager.ReplaceView(backupView, gameObject.name); GameObject keystoreText = backupView.transform.Find("TextKeystore").gameObject; GameObject privateKeyText = backupView.transform.Find("TextPrivateKey").gameObject; GameObject wordsText = backupView.transform.Find("TextWords").gameObject; Text contentText = backupView.transform.Find("Text").GetComponent <Text>(); Button btnClose = backupView.transform.Find("BtnClose").GetComponent <Button>(); Button btnCopy = backupView.transform.Find("BtnCopy").GetComponent <Button>(); keystoreText.SetActive(false); privateKeyText.SetActive(false); wordsText.SetActive(false); contentText.text = ""; if (backupType == BackupType.Keystore) { keystoreText.SetActive(true); contentText.text = AccountManager.Instance.GetKeytore(); } else if (backupType == BackupType.PrivateKey) { privateKeyText.SetActive(true); contentText.text = AccountManager.Instance.GetPrivateKey(); } else if (backupType == BackupType.Words) { wordsText.SetActive(true); contentText.text = string.Join(" ", AccountManager.Instance.GetWords()); } Utils.AddButtonClickEvent(btnClose, delegate() { ShowSettingView(); }); Utils.AddButtonClickEvent(btnCopy, delegate() { UniClipboard.SetText(contentText.text); ViewManager.ShowTip("复制成功"); }); }
private void ShowBackupView(BackupType backupType) { backupView.SetActive(true); GameObject keystoreText = backupView.transform.Find("TextKeystore").gameObject; GameObject privateKeyText = backupView.transform.Find("TextPrivateKey").gameObject; GameObject wordsText = backupView.transform.Find("TextWords").gameObject; Text contentText = backupView.transform.Find("Text").GetComponent <Text>(); Button btnConfirm = backupView.transform.Find("BtnConfirm").GetComponent <Button>(); Button btnCopy = backupView.transform.Find("BtnCopy").GetComponent <Button>(); keystoreText.SetActive(false); privateKeyText.SetActive(false); wordsText.SetActive(false); contentText.text = ""; if (backupType == BackupType.Keystore) { keystoreText.SetActive(true); contentText.text = mKeystore; } else if (backupType == BackupType.PrivateKey) { privateKeyText.SetActive(true); contentText.text = mPrivateKeyString; } else if (backupType == BackupType.Words) { wordsText.SetActive(true); contentText.text = string.Join(" ", mWords); } AddButtonClickEvent(btnConfirm, delegate() { backupView.SetActive(false); ShowSettingView(); }); AddButtonClickEvent(btnCopy, delegate() { UniClipboard.SetText(contentText.text); }); }
async void Init() { string id = await GetFirebaseInstanceId(); if (Debug.isDebugBuild && showFirebaseInstanceId) { UniClipboard.SetText(id); //Manager.Add(PopupController.POPUP_SCENE_NAME, new PopupData(PopupType.OK, System.String.Format("Instance ID Token {0}", id))); } if (FirebaseManager.FirebaseReady) { Debug.Log($"Firebase ready: {FirebaseManager.FirebaseReady}"); SetDefaultValues(); initSuccess = true; } FetchData(); if (Debug.isDebugBuild) { var setting = FirebaseRemoteConfig.Settings; setting.IsDeveloperMode = true; } }
// Start is called before the first frame update void Start() { UniClipboard.SetText("test"); }
public void PasteClipboardIntoText() { textInputField.text = UniClipboard.GetText(); }