// Update is called once per frame
        void Update()
        {
            if (_mainEngine == null)
            {
                return;
            }

            _mainEngine.UpdateTexture();

            #region 2D mouse

            if (Browser2D != null)
            {
                //GetScreenCoords(true);
            }


            #endregion

            //Dialog
            if (_showDialog)
            {
                ShowDialog();
            }

            //Query
            if (_startQuery)
            {
                _startQuery = false;
                if (OnJSQuery != null)
                {
                    OnJSQuery(_jsQueryString);
                }
            }

            //Status
            if (_setUrl)
            {
                _setUrl = false;
                if (UIEnabled && mainUIPanel != null)
                {
                    mainUIPanel.UrlField.text = _setUrlString;
                }
            }

            if (UIEnabled)
            {
                if (_focused && (mainUIPanel == null || !mainUIPanel.UrlField.isFocused)) //keys
                {
                    foreach (char c in Input.inputString)
                    {
                        _mainEngine.SendCharEvent((int)c, KeyboardEventType.CharKey);
                    }
                    ProcessKeyEvents();
                }
            }

            _mainEngine.CheckMessage();
        }
Exemplo n.º 2
0
        // Update is called once per frame
        void Update()
        {
            _mainEngine.UpdateTexture();



            //Dialog
            if (_showDialog)
            {
                ShowDialog();
            }

            //Query
            if (_startQuery)
            {
                _startQuery = false;
                if (OnJSQuery != null)
                {
                    OnJSQuery(_jsQueryString);
                }
            }

            //Status
            if (_setUrl)
            {
                _setUrl = false;
                mainUIPanel.UrlField.text = _setUrlString;
            }



            if (_focused) //keys
            {
                foreach (char c in Input.inputString)
                {
                    _mainEngine.SendCharEvent((int)c, KeyboardEventType.CharKey);
                }
                ProcessKeyEvents();

                if (Input.GetMouseButtonDown(0))
                {
                    MouseDown();
                    //Debug.Log("OnMouseDown");
                }
                if (Input.GetMouseButtonUp(0))
                {
                    MouseUp();
                    //     Debug.Log("OnMouseUp");
                }
                MouseOver();
            }
            else
            {
            }
        }
Exemplo n.º 3
0
        // Update is called once per frame
        void Update()
        {
            _mainEngine.UpdateTexture();



            //Dialog
            if (_showDialog)
            {
                ShowDialog();
            }

            //Query
            if (_startQuery)
            {
                _startQuery = false;
                if (OnJSQuery != null)
                {
                    OnJSQuery(_jsQueryString);
                }
            }

            //Status
            if (_setUrl)
            {
                _setUrl = false;
                if (UIEnabled)
                {
                    mainUIPanel.UrlField.text = _setUrlString;
                }
            }

            if (UIEnabled)
            {
                if (_focused && !mainUIPanel.UrlField.isFocused) //keys
                {
                    foreach (char c in Input.inputString)
                    {
                        _mainEngine.SendCharEvent((int)c, KeyboardEventType.CharKey);
                    }
                    ProcessKeyEvents();
                }
            }


            _mainEngine.CheckMessage();
        }