Exemplo n.º 1
0
        public static bool Resize_MouseDown(object sender, MouseEventArgs e)
        {
            if (host != null && Derma.GetSelected() == host && !host.locked && host.sizable && host.sizablex && Derma.IsMouseOverArea(host.x + host.width - halfSize - 2, host.y + host.height / 2 - halfSize, 16, 16))
            {
                resizing      = true;
                resizingx     = true;
                mouseOrigin.X = e.X;
                mouseOrigin.Y = e.Y;
                return(true);
            }
            else if (host != null && Derma.GetSelected() == host && !host.locked && host.sizable && host.sizabley && Derma.IsMouseOverArea(host.x + host.width / 2 - halfSize, host.y + host.height - halfSize - 2, 16, 16))
            {
                resizing      = true;
                resizingy     = true;
                mouseOrigin.X = e.X;
                mouseOrigin.Y = e.Y;
                return(true);
            }
            else if (host != null && Derma.GetSelected() == host && !host.locked && host.sizable && host.sizablex && host.sizabley && Derma.IsMouseOverArea(host.x + host.width - twoThirdsSize, host.y + host.height - twoThirdsSize, 16, 16))
            {
                resizing      = true;
                resizinga     = true;
                mouseOrigin.X = e.X;
                mouseOrigin.Y = e.Y;
                return(true);
            }

            return(false);
        }