Example #1
0
    private void CreateMouseEvent(QEnum.Type type, QEnum.MouseButton button)
    {
        var mouseEvent = new QMouseEvent(type, button, mouseLocalPos(), MouseScreenPos());

        switch (type)
        {
        case QEnum.Type.MouseButtonPress:
            ShowCursor(type);
            MousePressEvent(mouseEvent);
            break;

        case QEnum.Type.MouseButtonRelease:
            ShowCursor(type);
            MouseReleaseEvent(mouseEvent);
            break;
        }
    }
Example #2
0
    private void ShowCursor(QEnum.Type type)
    {
        if (cursor == null)
        {
            return;
        }

        switch (type)
        {
        case QEnum.Type.Enter: cursor.Show(); break;

        case QEnum.Type.Exit: cursor.Hide(); break;

        case QEnum.Type.MouseButtonPress:
        case QEnum.Type.DragLeave:
            cursor.SetState(QEnum.CursorState.Down); break;

        case QEnum.Type.MouseButtonRelease:
        case QEnum.Type.DragEnd:
            cursor.SetState(QEnum.CursorState.Hover); break;
        }
    }
Example #3
0
 public QDragEvent(object data, QEnum.MouseButton button, Vector2 localPos, Vector2 screenPos, QEnum.Type type = QEnum.Type.DragLeave)
     : base(type, localPos, screenPos)
 {
     dropData = data;
     b        = button;
 }
Example #4
0
 public QDragEvent(Vector2 localPos, Vector2 screenPos, QEnum.Type type = QEnum.Type.DragLeave)
     : base(type, localPos, screenPos)
 {
 }
Example #5
0
 public QEvent(QEnum.Type type)
 {
     t = type;
 }
Example #6
0
 public QMouseEvent(QEnum.Type type, QEnum.MouseButton button, Vector2 localPos, Vector2 screenPos) : base(type)
 {
     b = button;
     l = localPos;
     s = screenPos;
 }
Example #7
0
 public QMouseEvent(QEnum.Type type, Vector2 localPos, Vector2 screenPos) : base(type)
 {
     l = localPos;
     s = screenPos;
 }
Example #8
0
 public QExitEvent(QEnum.Type type = QEnum.Type.Exit) : base(type)
 {
 }
Example #9
0
 public QWheelEvent(Vector2 delta, QEnum.Type type = QEnum.Type.Wheel) : base(type)
 {
     d = (int)delta.y;
 }
Example #10
0
 public QFocusEvent(QEnum.Type type) : base(type)
 {
 }
Example #11
0
 public QEnterEvent(QEnum.Type type = QEnum.Type.Enter) : base(type)
 {
 }
Example #12
0
 public QMoveEvent(Vector2 size, Vector2 oldSize, QEnum.Type type = QEnum.Type.Move) : base(type)
 {
     s = size;
     o = oldSize;
 }
Example #13
0
 public QCloseEvent(QEnum.Type type = QEnum.Type.Close) : base(type)
 {
 }
Example #14
0
 public QHideEvent(QEnum.Type type = QEnum.Type.Hide) : base(type)
 {
 }
Example #15
0
 public QShowEvent(QEnum.Type type = QEnum.Type.Show) : base(type)
 {
 }
Example #16
0
 public QKeyEvent(QEnum.Type type, KeyCode keyCode, EventModifiers modifiers) : base(type)
 {
     k = keyCode;
     m = modifiers;
 }
Example #17
0
 public QDropEvent(Vector2 localPos, Vector2 screenPos, QEnum.Type type = QEnum.Type.Drop)
     : base(localPos, screenPos, type)
 {
 }