Follow along with the video below to see how to install our site as a web app on your home screen.
Примечание: This feature may not be available in some browsers.
func_152125_a(x, y, u, v, sizeForU, sizeForV, sizeForX, sizeForY, sizeTextureX, sizeTextureY);
timaxa007 написал(а):Код:func_152125_a(x, y, u, v, sizeForU, sizeForV, sizeForX, sizeForY, sizeTextureX, sizeTextureY);
func_152125_a(x, y, sizeForX, sizeForY, u, v, sizeForU, sizeForV, sizeTextureX, sizeTextureY);
public static void drawTexturedRect(double x, double y, double w, double h,
double u, double v, double tw, double th, int tmw, int tmh)
{
double tsu = 1.0F / (double) tmw;
double tsv = 1.0F / (double) tmh;
Tessellator tess = Tessellator.instance;
tess.startDrawingQuads();
tess.setColorRGBA_F(1f, 1f, 1f, alpha);
tess.addVertexWithUV(x, y + h, zLevel, u * tsu, (v + th) * tsv);
tess.addVertexWithUV(x + w, y + h, zLevel, (u + tw) * tsu, (v + th) * tsv);
tess.addVertexWithUV(x + w, y, zLevel, (u + tw) * tsu, v * tsv);
tess.addVertexWithUV(x, y, zLevel, u * tsu, v * tsv);
tess.draw();
}