Ejemplo n.º 1
0
        public override bool Contains(int x, int y)
        {
            UOTexture texture_flag = GumpsLoader.Instance.GetTexture(0x0828);

            if (texture_flag == null)
            {
                return(false);
            }

            y -= _sliderPosition;

            return(texture_flag.Contains(x, y));
        }
Ejemplo n.º 2
0
        private static bool PixelsInXY(UOTexture texture, int x, int y, int width = 0, int height = 0)
        {
            if (x < 0 || y < 0 || (width > 0 && x >= width) || (height > 0 && y >= height))
            {
                return(false);
            }

            int textureWidth  = texture.Width;
            int textureHeight = texture.Height;

            if (width == 0)
            {
                width = textureWidth;
            }

            if (height == 0)
            {
                height = textureHeight;
            }


            while (x > textureWidth && width > textureWidth)
            {
                x     -= textureWidth;
                width -= textureWidth;
            }

            if (x < 0 || x > width)
            {
                return(false);
            }

            while (y > textureHeight && height > textureHeight)
            {
                y      -= textureHeight;
                height -= textureHeight;
            }

            if (y < 0 || y > height)
            {
                return(false);
            }

            return(texture.Contains(x, y));
        }
Ejemplo n.º 3
0
 public static bool IsPointInStatic(UOTexture texture, int x, int y)
 {
     return(texture != null && texture.Contains
                (TranslatedMousePositionByViewport.X - x, TranslatedMousePositionByViewport.Y - y));
 }