本文整理汇总了C#中FairyGUI.EventContext.CaptureTouch方法的典型用法代码示例。如果您正苦于以下问题:C# EventContext.CaptureTouch方法的具体用法?C# EventContext.CaptureTouch怎么用?C# EventContext.CaptureTouch使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FairyGUI.EventContext
的用法示例。
在下文中一共展示了EventContext.CaptureTouch方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: __touchBegin
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);
}
示例2: __touchBegin
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);
}
示例3: __touchBegin
private void __touchBegin(EventContext context)
{
_down = true;
if (dropdown != null)
ShowDropdown();
context.CaptureTouch();
}
示例4: __touchBegin
private void __touchBegin(EventContext context)
{
if (context.initiator is InputTextField)
return;
_down = true;
if (dropdown != null)
ShowDropdown();
context.CaptureTouch();
}
示例5: __touchBegin
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);
}
}
示例6: __gripTouchBegin
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);
}
示例7: __touchBegin
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();
}
示例8: __gripTouchBegin
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);
}