示例#1
0
    private void handleMouseDown(object sender, MouseEventArgs e)
    {
        if (p_LogicDisabled)
        {
            return;
        }
        p_MouseDown = true;

        Point mousePosition = PointToClient(Cursor.Position);

        if (p_EventHijacker != null)
        {
            p_EventHijacker.OnMouseDown(this, mousePosition, e);
        }

        /*fire for all ui elements BUT the click drag and test if
         * the mouse collids with any, if so, we don't call click+drag*/
        int uiL = p_UIElements.Length;

        for (int c = 0; c < uiL; c++)
        {
            IUI ui = p_UIElements[c];
            ui.OnMouseDown(this, mousePosition, e);
        }
    }