当前位置: 首页>>代码示例>>C#>>正文


C# UnityEngine.TouchScreenKeyboard类代码示例

本文整理汇总了C#中UnityEngine.TouchScreenKeyboard的典型用法代码示例。如果您正苦于以下问题:C# TouchScreenKeyboard类的具体用法?C# TouchScreenKeyboard怎么用?C# TouchScreenKeyboard使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


TouchScreenKeyboard类属于UnityEngine命名空间,在下文中一共展示了TouchScreenKeyboard类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Awake

    void Awake()
    {
        List<GameObject> eventSystems = new List<GameObject>();

        foreach (GameObject obj in FindObjectsOfType(typeof(GameObject)))
            if(obj.GetComponent<EventSystem>())
                eventSystems.Add(obj);

        if(eventSystems.Count == 0)
        {
            eventSystem = new GameObject();
            eventSystem.AddComponent<EventSystem>();
            eventSystem.AddComponent<TouchInputModule>();
            eventSystem.AddComponent<StandaloneInputModule>();
        }

        callback = FBWrapper.Instance.uploadCallback;
        image = FBWrapper.Instance.uploadImage;

        if(image != null)
        {
            uploadImage.sprite = Sprite.Create(image,
                                               new Rect(0, 0, image.width, image.height),
                                               new Vector2(.5f, .5f));
        }

        keyboard = TouchScreenKeyboard.Open ("");
    }
开发者ID:shawmakesmusic,项目名称:leo,代码行数:28,代码来源:FBUploadImage.cs

示例2: Open

        public void Open(string text, bool autocorrection, bool multiline, bool secure, bool alert, string textPlaceholder, int keyboardType)
        {
            if (_keyboard != null)
                return;

            _keyboard = UnityEngine.TouchScreenKeyboard.Open(text, (TouchScreenKeyboardType)keyboardType, autocorrection, multiline, secure, alert, textPlaceholder);
        }
开发者ID:fairygui,项目名称:FairyGUI-unity,代码行数:7,代码来源:TouchScreenKeyboard.cs

示例3: Update

 void Update()
 {
     if(Input.touchCount==3){
         TouchScreenKeyboard.hideInput=true;
         teclado = TouchScreenKeyboard.Open("", TouchScreenKeyboardType.NamePhonePad,false,false,false,true,"");
     }
 }
开发者ID:tejerolucas,项目名称:Social-Drive,代码行数:7,代码来源:WhatsappLayout.cs

示例4: OnEnter

 public override void OnEnter()
 {
     if (keyboard == null)
     {
         keyboard = TouchScreenKeyboard.Open(text.Value,keyBoardType,autoCorrection.Value,multiLine.Value,secure.Value,alert.Value,textPlaceHolder.Value);
     }
 }
开发者ID:realshyfox,项目名称:PlayMakerCustomActions_U3,代码行数:7,代码来源:OpenDeviceKeyBoard.cs

示例5: OpenKeyboard

    public void OpenKeyboard()
    {
        if (keyboard != null && keyboard.active)
            return;

        keyboard = TouchScreenKeyboard.Open(inputFieldText.text);
    }
开发者ID:JoshSauter,项目名称:MTGFinance,代码行数:7,代码来源:InputFieldMobile.cs

示例6: ButtonClicked

 void ButtonClicked(int buttonNo)
 {
     Debug.Log ("Button clicked = " + buttonNo);
     keyboard = TouchScreenKeyboard.Open("", TouchScreenKeyboardType.Default);
     keyboard.active = true;
     //dlt.setBrush (buttonNo);
 }
开发者ID:rinkenuyten,项目名称:ExpoDraw,代码行数:7,代码来源:PainterBoard.cs

示例7: ButtonPress

 public void ButtonPress(string buttonName)
 {
     if(buttonName.CompareTo("Menu")==0)
     {
         if(gameMode == _PlayGame || gameMode == _Menu || gameMode == _View)
             Menu();
     }
     else if(buttonName.CompareTo("Solve")==0)
     {
         Solve();
     }
     else if(buttonName.CompareTo("Confirm")==0)
     {
         if(gameMode == _Menu)
         {
             Time.timeScale = 1;
             Application.LoadLevel("menu");
         }
     }
     else if(buttonName.CompareTo("Cancel")==0)
     {
         if(gameMode == _Menu)
         {
             Menu();
         }
     }
     else if(buttonName.CompareTo("Keyboard")==0)
     {
         if(touchScreenKeyboard == null && letter != null)
         {
             touchScreenKeyboard = TouchScreenKeyboard.Open("0", TouchScreenKeyboardType.Default);
         }
         else if(touchScreenKeyboard == null && gameMode == _EnterName)
         {
             touchScreenKeyboard = TouchScreenKeyboard.Open("0", TouchScreenKeyboardType.Default);
         }
     }
     else if(buttonName.CompareTo("Scoreboard")==0)
     {
         if(gameMode == _EnterName)
         {
             if(touchScreenKeyboard == null)
             {
                 touchScreenKeyboard = TouchScreenKeyboard.Open("0", TouchScreenKeyboardType.Default);
             }
             else
             {
                 touchScreenKeyboard.active = false;
                 touchScreenKeyboard = null;
                 Enter();
             }
         }
         else if(gameMode == _ScoreBoard)
         {
             Enter();
         }
     }
 }
开发者ID:iaconic,项目名称:Crossword,代码行数:58,代码来源:Game.cs

示例8: NameText

 protected IEnumerator NameText()
 {
     Debug.Log("We have executed NameText");
     yield return 0;
     Keyboard = TouchScreenKeyboard.Open("", TouchScreenKeyboardType.Default, false, false, false, false, "Enter Text");
     Open = true;
     //Statics.GuiTouch.ToggleTouch(false);
     //Reset();
 }
开发者ID:Xellos1010,项目名称:Unity4GUISystem,代码行数:9,代码来源:SubmitNameCheck_Phone.cs

示例9: bottom_scoring

    IEnumerator bottom_scoring()
    {
        bot_needs = true;

        while(scoring_top)
            yield return new WaitForSeconds(.2f);

        keyboard2 = TouchScreenKeyboard.Open(pname, TouchScreenKeyboardType.Default, false);
        scoring_bot = true;
    }
开发者ID:Zaandaa,项目名称:onionsurprise,代码行数:10,代码来源:touchscript.cs

示例10: OpenKeyboard

 public static void OpenKeyboard(string text, TouchScreenKeyboardType keyboardType, bool autocorrection, bool multiline, bool secure, bool alert, bool hideInput)
 {
     #if UNITY_IPHONE || UNITY_ANDROID
     if( !Application.isEditor )
     {
         keyboard = TouchScreenKeyboard.Open(text, keyboardType, autocorrection, multiline, secure, alert);
         TouchScreenKeyboard.hideInput = hideInput;
         lastMobileKeyboardText = "";
     }
     #endif
 }
开发者ID:KittyMac,项目名称:PlanetUnity,代码行数:11,代码来源:PlanetUnityKeyboardInput.cs

示例11: OnEnter

        public override void OnEnter()
        {
            _done = false;

            UnityEngine.Debug.Log("OpenDeviceKeyBoard OPEN");
            if (keyboard == null)
            {
                keyboard = TouchScreenKeyboard.Open(text.Value,keyBoardType,autoCorrection.Value,multiLine.Value,secure.Value,alert.Value,textPlaceHolder.Value);

            }else{
                UnityEngine.Debug.Log("OpenDeviceKeyBoard OPEN NOT NULL");
            }
        }
开发者ID:nothiphop,项目名称:PlayMakerCustomActions_U3,代码行数:13,代码来源:OpenDeviceKeyBoard.cs

示例12: handleTouchKeyboardFocusIn

	protected void handleTouchKeyboardFocusIn( TextField txt  ) {
		
#if UNITY_IPHONE || UNITY_ANDROID || UNITY_WP8			
 		// Set text for input change detection
	   	string prevText = txt.text;    
	    lastTxt = prevText;
	    
	    // Open keyboard on focus change
	    keyboard = TouchScreenKeyboard.Open(prevText, keyboardType );
	    
	    activeInput = txt;
#endif		
	}
开发者ID:Angryman80,项目名称:spi,代码行数:13,代码来源:TouchInputHelper.cs

示例13: _OnChangeTextDone

    private IEnumerator _OnChangeTextDone(TouchScreenKeyboard keyboard)
    {
        while (!keyboard.done)
            yield return null;

        if (PlayerData.Current.gold >= chatItem.Price)
        {
            CoinController.Instance.SetCoins(PlayerData.Current.gold - chatItem.Price);
            chatItem.Text = keyboard.text;
            chatItem.Save();
            Reload();
        }
        else
        {
            WarningDialogController.Instance.ShowNotEnoughCoins();
        }
    }
开发者ID:trongthien18,项目名称:race-of-dragons,代码行数:17,代码来源:ChatEmojiController.cs

示例14: OnDeselectEvent

 protected void OnDeselectEvent()
 {
     if (this.mDoInit)
     {
         this.Init();
     }
     if ((this.label != null) && NGUITools.IsActive(this))
     {
         this.mValue = this.value;
         if (mKeyboard != null)
         {
             mKeyboard.active = false;
             mKeyboard = null;
         }
         if (string.IsNullOrEmpty(this.mValue))
         {
             this.label.text = this.mDefaultText;
             this.label.color = this.mDefaultColor;
         }
         else
         {
             this.label.text = this.mValue;
         }
         Input.imeCompositionMode = IMECompositionMode.Off;
         this.RestoreLabelPivot();
     }
     selection = null;
     this.UpdateLabel();
 }
开发者ID:Lessica,项目名称:Something-of-SHIPWAR-GAMES,代码行数:29,代码来源:UIInput.cs

示例15: Close

 public void Close()
 {
     if (_keyboard != null)
     {
         _keyboard.active = false;
         _keyboard = null;
     }
 }
开发者ID:fairygui,项目名称:FairyGUI-unity,代码行数:8,代码来源:TouchScreenKeyboard.cs


注:本文中的UnityEngine.TouchScreenKeyboard类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。