Ejemplo n.º 1
0
 public static bool Released(this HUMEvents.Data.Right right)
 {
     HUMEvents.clickCount--;
     return(right.mouse.e.button == 1 && right.mouse.e.type == EventType.MouseUp);
 }
Ejemplo n.º 2
0
 public static bool Clicked(this HUMEvents.Data.Right right)
 {
     HUMEvents.clickCount++;
     return(right.mouse.e.button == 1 && right.mouse.e.type == EventType.MouseDown);
 }
Ejemplo n.º 3
0
        /// <summary>
        /// A horizontal handle for manipulating a rects size.
        /// Changes the cursor when inside the right of rect.
        /// Clicking and holding the left mouse will return a new value based on the mouse movement.
        /// </summary>
        public static Rect Resizer(this HUMEvents.Data.Right right, Rect rect, Vector2 minSize, Vector2 maxSize, float handleWidth, bool mouseDown, ref bool isUsing)
        {
            var handleRect = new Rect(rect.xMax - (handleWidth / 2), rect.y, handleWidth, rect.height);

            return(Resizer(right.mouse, handleRect, rect, minSize, maxSize, HUMEvents_Children.Side.Right, mouseDown, ref isUsing));
        }