public static void DrawTexture(string path, Point position, Size size)
{
int screenw = Game.ScreenResolution.Width;
int screenh = Game.ScreenResolution.Height;
const float height = 1080f;
float ratio = (float)screenw / screenh;
float width = height * ratio;
float reduceX = UI.WIDTH / width;
float reduceY = UI.HEIGHT / height;
Point extra = new Point(0, 0);
if (screenw == 1914 && screenh == 1052) //TODO: Fix this when ScriptHookVDotNet 1.2 comes out.
extra = new Point(15, 0);
UI.DrawTexture(path, 1, 1, 60,
new Point(Convert.ToInt32(position.X * reduceX) + extra.X, Convert.ToInt32(position.Y * reduceY) + extra.Y),
new PointF(0f, 0f),
new Size(Convert.ToInt32(size.Width * reduceX), Convert.ToInt32(size.Height * reduceY)),
0f, Color.White);
}