本文整理汇总了C#中FairyGUI.EventContext.StopPropagation方法的典型用法代码示例。如果您正苦于以下问题:C# EventContext.StopPropagation方法的具体用法?C# EventContext.StopPropagation怎么用?C# EventContext.StopPropagation使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FairyGUI.EventContext
的用法示例。
在下文中一共展示了EventContext.StopPropagation方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: __click
void __click(EventContext context)
{
Vector3 v = context.inputEvent.position;
v = this.GlobalToLocal(v);
HtmlElement_A link = _textField.GetLink(v);
if (link != null)
{
this.DispatchEvent(onClickLink.type, link.href);
context.StopPropagation();
}
}
示例2: __touchBegin
void __touchBegin(EventContext context)
{
context.StopPropagation();
InputEvent evt = context.inputEvent;
Vector2 pt = _grip.GlobalToLocal(new Vector2(evt.x, evt.y));
if (_vertical)
{
if (pt.y < 0)
_target.ScrollUp(4, false);
else
_target.ScrollDown(4, false);
}
else
{
if (pt.x < 0)
_target.ScrollLeft(4, false);
else
_target.ScrollRight(4, false);
}
}
示例3: __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);
}
示例4: __arrowButton2Click
void __arrowButton2Click(EventContext context)
{
context.StopPropagation();
if (_vertical)
_target.ScrollDown();
else
_target.ScrollRight();
}
示例5: __arrowButton1Click
void __arrowButton1Click(EventContext context)
{
context.StopPropagation();
if (_vertical)
_target.ScrollUp();
else
_target.ScrollLeft();
}
示例6: __gripMouseDown
void __gripMouseDown(EventContext context)
{
if (_bar == null)
return;
context.StopPropagation();
InputEvent evt = context.inputEvent;
_touchId = evt.touchId;
_dragOffset.x = evt.x / GRoot.contentScaleFactor - _grip.x;
_dragOffset.y = evt.y / GRoot.contentScaleFactor - _grip.y;
_dragging = true;
Stage.inst.onMouseMove.Add(__stageMouseMove);
Stage.inst.onMouseUp.Add(__stageMouseUp);
}