CaptureTouch() public method

public CaptureTouch ( ) : void
return void
 static public int CaptureTouch(IntPtr l)
 {
     try {
         FairyGUI.EventContext self = (FairyGUI.EventContext)checkSelf(l);
         self.CaptureTouch();
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
 static int CaptureTouch(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 1);
         FairyGUI.EventContext obj = (FairyGUI.EventContext)ToLua.CheckObject <FairyGUI.EventContext>(L, 1);
         obj.CaptureTouch();
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
示例#3
0
        void __touchBegin(EventContext context)
        {
            if (!_editing || textField.charPositions.Count <= 1)
            {
                return;
            }

            ClearSelection();

            Vector2 v = Stage.inst.touchPosition;

            v = this.GlobalToLocal(v);
            TextField.CharPosition cp = GetCharPosition(v);

            AdjustCaret(cp, true);

            context.CaptureTouch();
        }
示例#4
0
        private void __gripTouchBegin(EventContext context)
        {
            this.canDrag = true;

            context.StopPropagation();

            InputEvent evt = context.inputEvent;

            if (evt.button != 0)
            {
                return;
            }

            context.CaptureTouch();

            _clickPos     = this.GlobalToLocal(new Vector2(evt.x, evt.y));
            _clickPercent = (float)(_value / _max);
        }
        void __touchBegin(EventContext context)
        {
            if (!_editing || textField.charPositions.Count <= 1 ||
                keyboardInput && Stage.keyboardInput && !Stage.inst.keyboard.supportsCaret ||
                context.inputEvent.button != 0)
            {
                return;
            }

            ClearSelection();

            Vector3 v = Stage.inst.touchPosition;

            v = this.GlobalToLocal(v);
            TextField.CharPosition cp = GetCharPosition(v);

            AdjustCaret(cp, true);

            context.CaptureTouch();
        }
示例#6
0
        void __gripTouchBegin(EventContext context)
        {
            if (_bar == null)
            {
                return;
            }

            context.StopPropagation();

            InputEvent evt = context.inputEvent;

            if (evt.button != 0)
            {
                return;
            }

            context.CaptureTouch();

            _dragOffset = this.GlobalToLocal(new Vector2(evt.x, evt.y)) - _grip.xy;
        }
示例#7
0
        void __touchBegin(EventContext context)
        {
            if (!_editing || textField.lines.Count == 0)
            {
                return;
            }

            ClearSelection();

            Vector3 v = Stage.inst.touchPosition;

            v = this.GlobalToLocal(v);
            CharPosition cp = GetCharPosition(v);

            AdjustCaret(cp);
            _selectionStart = cp;

            context.CaptureTouch();
            Stage.inst.onTouchMove.AddCapture(_touchMoveDelegate);
        }
		void __touchBegin(EventContext context)
		{
			if (_caret == null || _lines.Count == 0)
				return;

			ClearSelection();

			CharPosition cp;
			if (_textChanged) //maybe the text changed in user's touchBegin
			{
				cp.charIndex = 0;
				cp.lineIndex = 0;
			}
			else
			{
				Vector3 v = Stage.inst.touchPosition;
				v = this.GlobalToLocal(v);
				Vector2 offset = _GetPositionOffset();
				v.x += offset.x;
				v.y += offset.y;
				cp = GetCharPosition(v);
			}

			AdjustCaret(cp);
			_selectionStart = cp;

			context.CaptureTouch();
			Stage.inst.onTouchMove.AddCapture(_touchMoveDelegate);
		}
        private void __touchBegin(EventContext context)
        {
            _down = true;

            if (dropdown != null)
                ShowDropdown();

            context.CaptureTouch();
        }
示例#10
0
        void __touchBegin(EventContext context)
        {
            if (!_editing || textField.lines.Count == 0)
                return;

            ClearSelection();

            Vector3 v = Stage.inst.touchPosition;
            v = this.GlobalToLocal(v);
            TextField.CharPosition cp = GetCharPosition(v);

            AdjustCaret(cp);
            _selectionStart = cp;

            context.CaptureTouch();
            Stage.inst.onTouchMove.AddCapture(_touchMoveDelegate);
        }
示例#11
0
        private void __touchBegin(EventContext context)
        {
            if (context.initiator is InputTextField)
                return;

            _down = true;

            if (dropdown != null)
                ShowDropdown();

            context.CaptureTouch();
        }
示例#12
0
        private void __touchBegin(EventContext context)
        {
            _down = true;
            context.CaptureTouch();

            if (_mode == ButtonMode.Common)
            {
                if (this.grayed && _buttonController != null && _buttonController.HasPage(DISABLED))
                    SetState(SELECTED_DISABLED);
                else
                    SetState(DOWN);
            }

            if (linkedPopup != null)
            {
                if (linkedPopup is Window)
                    ((Window)linkedPopup).ToggleStatus();
                else
                    this.root.TogglePopup(linkedPopup, this);
            }
        }
        void __gripTouchBegin(EventContext context)
        {
            if (_bar == null)
                return;

            context.StopPropagation();
            InputEvent evt = context.inputEvent;
            _touchId = evt.touchId;

            _dragOffset = this.GlobalToLocal(new Vector2(evt.x, evt.y)) - _grip.xy;

            context.CaptureTouch();
            Stage.inst.onTouchMove.Add(_touchMoveDelegate);
        }
示例#14
0
        void __touchBegin(EventContext context)
        {
            InputEvent evt = context.inputEvent;
            _startPoint = _host.GlobalToLocal(new Vector2(evt.x, evt.y));
            _started = false;

            Timers.inst.Add(trigger, 1, __timer);
            context.CaptureTouch();
        }
示例#15
0
        private void __gripTouchBegin(EventContext context)
        {
            InputEvent evt = context.inputEvent;
            _touchId = evt.touchId;

            _clickPos = this.GlobalToLocal(new Vector2(evt.x, evt.y));
            _clickPercent = (float)_value / _max;

            context.CaptureTouch();
            Stage.inst.onTouchMove.Add(_touchMoveDelegate);
        }