loading gui + converter
This commit is contained in:
parent
9df6406a93
commit
90de256e04
7 changed files with 259 additions and 178 deletions
|
@ -317,31 +317,9 @@ public abstract class Gui {
|
|||
Drawing.drawGradient(0, 0, this.gm.fb_x, this.gm.fb_y, 0xc0101010, 0xd0101010);
|
||||
}
|
||||
else {
|
||||
this.drawDirtBackground(0, 0, this.gm.fb_x, this.gm.fb_y);
|
||||
Drawing.drawScaledBackground(this.gm, DIRT_BACKGROUND);
|
||||
}
|
||||
}
|
||||
|
||||
public void drawDirtBackground(double x, double y, double width, double height) {
|
||||
GlState.enableTexture2D();
|
||||
GlState.disableLighting();
|
||||
GlState.disableFog();
|
||||
RenderBuffer buf = Tessellator.getBuffer();
|
||||
this.gm.getTextureManager().bindTexture(DIRT_BACKGROUND);
|
||||
GlState.color(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
double scale = 32.0;
|
||||
buf.begin(7, DefaultVertexFormats.POSITION_TEX_COLOR);
|
||||
buf.pos(x, y + height, 0.0D).tex(0.0D, height / scale)
|
||||
.color(64, 64, 64, 255).endVertex();
|
||||
buf.pos(x + width, y + height, 0.0D)
|
||||
.tex(width / scale, height / scale)
|
||||
.color(64, 64, 64, 255).endVertex();
|
||||
buf.pos(x + width, y, 0.0D).tex(width / scale, 0.0)
|
||||
.color(64, 64, 64, 255).endVertex();
|
||||
buf.pos(x, y, 0.0D).tex(0.0D, 0.0)
|
||||
.color(64, 64, 64, 255).endVertex();
|
||||
Tessellator.draw();
|
||||
GlState.disableTexture2D();
|
||||
}
|
||||
|
||||
public void render() {
|
||||
this.drawMainBackground();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue