本文整理汇总了C#中dfControl.OnMouseDown方法的典型用法代码示例。如果您正苦于以下问题:C# dfControl.OnMouseDown方法的具体用法?C# dfControl.OnMouseDown怎么用?C# dfControl.OnMouseDown使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类dfControl
的用法示例。
在下文中一共展示了dfControl.OnMouseDown方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ProcessInput
//.........这里部分代码省略.........
}
else
{
var cancelState = ( control == null ) ? dfDragDropState.CancelledNoTarget : dfDragDropState.Cancelled;
var dragArgs = new dfDragEventArgs( activeControl, cancelState, dragData, ray, position );
activeControl.OnDragEnd( dragArgs );
}
dragState = dfDragDropState.None;
lastDragControl = null;
activeControl = null;
lastClickTime = 0f;
lastHoverTime = 0f;
lastPosition = position;
return;
}
#endregion
#region Mouse button pressed
if( buttonsPressed != dfMouseButtons.None )
{
lastHoverTime = Time.realtimeSinceStartup + manager.hoverStartDelay;
if( activeControl != null )
{
// If a control has capture, forward all events to it
if( activeControl.transform.IsChildOf( manager.transform ) )
{
activeControl.OnMouseDown( new dfMouseEventArgs( activeControl, buttonsPressed, 0, ray, position, scroll ) );
}
}
else if( control == null || control.transform.IsChildOf( manager.transform ) )
{
setActive( manager, control, position, ray );
if( control != null )
{
dfGUIManager.SetFocus( control );
control.OnMouseDown( new dfMouseEventArgs( control, buttonsPressed, 0, ray, position, scroll ) );
}
else if( !retainFocusSetting )
{
var focusControl = dfGUIManager.ActiveControl;
if( focusControl != null && focusControl.transform.IsChildOf( manager.transform ) )
{
focusControl.Unfocus();
}
}
}
if( buttonsReleased == dfMouseButtons.None )
return;
}
#endregion
#region Mouse button released
if( buttonsReleased != dfMouseButtons.None )