Nez.Portable/UI/Stage.cs
/// <summary>
/// Process events for Mouse or Touch input.
/// </summary>
/// <param name="inputPos">location of cursor</param>
/// <param name="inputPressed">down this frame</param>
/// <param name="inputReleased">up this frame</param>
/// <param name="inputMoved">cursor in a different location</param>
/// <param name="lastOver">last element that the cursor was over, ref is saved here for next update</param>
Process events for Mouse or Touch input.
Process events for Mouse or Touch input .
void updateInputPoint(
            Vector2 inputPos,
            bool inputPressed,
            bool inputReleased,
            bool inputMoved,
            ref Element lastOver)
        {
            var over = hit(inputPos);
            if (over != null)
                handleMouseWheel(over);
            if (inputPressed)
            {
                updateInputDown(inputPos, over);
            }
            if (inputMoved)
            {
                updateInputMoved(inputPos, over, lastOver);
            }
            if (inputReleased)
            {
                updateInputReleased(inputPos);
            }
            lastOver = over;
        }
void updateInputPoint ( Vector2 inputPos , bool inputPressed , bool inputReleased , bool inputMoved , ref Element lastOver ) { var over = hit ( inputPos ) ; if ( over != null ) handleMouseWheel ( over ) ; if ( inputPressed ) { updateInputDown ( inputPos , over ) ; } if ( inputMoved ) { updateInputMoved ( inputPos , over , lastOver ) ; } if ( inputReleased ) { updateInputReleased ( inputPos ) ; } lastOver = over ; }
Process events for Mouse or Touch input.
Process events for Mouse or Touch input .
inputPos
Vector2
location of cursor
location of cursor
inputPressed
bool
down this frame
down this frame
inputReleased
bool
up this frame
up this frame
inputMoved
bool
cursor in a different location
cursor in a different location
Element
ref
lastOver
last element that the cursor was over, ref is saved here for next update
last element that the cursor was over ref is saved here for next update