net.minecraft.client.gui.AbstractGui Java Examples

The following examples show how to use net.minecraft.client.gui.AbstractGui. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: WorldSaveRow.java    From BoundingBoxOutlineReloaded with MIT License 5 votes vote down vote up
@Override
public void render(int mouseX, int mouseY) {
    String displayName = this.worldSummary.getDisplayName();
    String details = this.worldSummary.getFileName() + " (" + DATE_FORMAT.format(new Date(this.worldSummary.getLastTimePlayed())) + ")";

    int x = this.getX();
    int y = this.getY();
    this.client.fontRenderer.drawString(displayName, (float) (x + ICON_SIZE + 3), (float) (y + 1), 16777215);
    this.client.fontRenderer.drawString(details, (float) (x + ICON_SIZE + 3), (float) (y + 1 + this.client.fontRenderer.FONT_HEIGHT + 1), 8421504);
    this.client.getTextureManager().bindTexture(this.icon != null ? this.iconLocation : ICON_MISSING);
    RenderHelper.enableBlend();
    AbstractGui.blit(x, y, 0.0F, 0.0F, ICON_SIZE, ICON_SIZE, 32, 32);
    RenderHelper.disableBlend();
}
 
Example #2
Source File: ControlList.java    From BoundingBoxOutlineReloaded with MIT License 5 votes vote down vote up
private void drawListBackground() {
    this.minecraft.getTextureManager().bindTexture(AbstractGui.BACKGROUND_LOCATION);
    Renderer.startTextured()
            .setColor(32, 32, 32)
            .setAlpha(255)
            .addPoint(0, this.bottom, 0.0D, (float) 0 / 32.0F, (float) (this.bottom + (int) this.amountScrolled) / 32.0F)
            .addPoint(this.width, this.bottom, 0.0D, (float) this.width / 32.0F, (float) (this.bottom + (int) this.amountScrolled) / 32.0F)
            .addPoint(this.width, this.top, 0.0D, (float) this.width / 32.0F, (float) (this.top + (int) this.amountScrolled) / 32.0F)
            .addPoint(0, this.top, 0.0D, (float) 0 / 32.0F, (float) (this.top + (int) this.amountScrolled) / 32.0F)
            .render();
}
 
Example #3
Source File: ControlList.java    From BoundingBoxOutlineReloaded with MIT License 5 votes vote down vote up
private void overlayBackground(int top, int bottom) {
    this.minecraft.getTextureManager().bindTexture(AbstractGui.BACKGROUND_LOCATION);
    Renderer.startTextured()
            .setColor(64, 64, 64)
            .setAlpha(255)
            .addPoint(0, bottom, 0.0D, 0.0D, (float) bottom / 32.0F)
            .addPoint(this.width, bottom, 0.0D, (float) this.width / 32.0F, (float) bottom / 32.0F)
            .addPoint(this.width, top, 0.0D, (float) this.width / 32.0F, (float) top / 32.0F)
            .addPoint(0, top, 0.0D, 0.0D, (float) top / 32.0F)
            .render();
}