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)); }
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)); }
public static bool IsPointInStatic(UOTexture texture, int x, int y) { return(texture != null && texture.Contains (TranslatedMousePositionByViewport.X - x, TranslatedMousePositionByViewport.Y - y)); }