Example usage for net.minecraftforge.fml.client.config GuiUtils drawContinuousTexturedBox

List of usage examples for net.minecraftforge.fml.client.config GuiUtils drawContinuousTexturedBox

Introduction

In this page you can find the example usage for net.minecraftforge.fml.client.config GuiUtils drawContinuousTexturedBox.

Prototype

public static void drawContinuousTexturedBox(ResourceLocation res, int x, int y, int u, int v, int width,
        int height, int textureWidth, int textureHeight, int borderSize, float zLevel) 

Source Link

Document

Draws a textured box of any size (smallest size is borderSize * 2 square) based on a fixed size textured box with continuous borders and filler.

Usage

From source file:com.fireball1725.firelib.guimaker.containers.GuiWindow.java

License:Open Source License

@SideOnly(Side.CLIENT)
@Override//  w  w w  . jav  a2 s.  c o  m
public void drawGuiContainerBackgroundLayer(float partialTicks, int mouseX, int mouseY) {
    super.drawGuiContainerBackgroundLayer(partialTicks, mouseX, mouseY);

    if (!this.isContainerVisible())
        return;

    GuiUtils.drawContinuousTexturedBox(this.DarkSkin, this.getLeft(), this.getTop(), 0, 0, this.getWidth(),
            this.getHeight(), 32, 32, 4, this.zLevel);
}

From source file:com.fireball1725.firelib.guimaker.controls.GuiCheckbox.java

License:Open Source License

@SideOnly(Side.CLIENT)
@Override//from   ww  w . j a v a2  s .co  m
public void drawGuiContainerBackgroundLayer(float partialTicks, int mouseX, int mouseY) {
    super.drawGuiContainerBackgroundLayer(partialTicks, mouseX, mouseY);

    //Draw Checkbox Border
    GuiUtils.drawContinuousTexturedBox(this.DarkSkin, this.getLeft(), this.getTop(), 0, TEXTURE_V, TEXTURE_W,
            TEXTURE_H, TEXTURE_W, TEXTURE_H, 1, 100);

    if (this.isControlHovered()) {
        if (this.controlValue)
            GuiUtils.drawContinuousTexturedBox(this.DarkSkin, this.getLeft(), this.getTop(), 64, TEXTURE_V,
                    TEXTURE_W, TEXTURE_H, TEXTURE_W, TEXTURE_H, 1, 100);
        else
            GuiUtils.drawContinuousTexturedBox(this.DarkSkin, this.getLeft(), this.getTop(), 32, TEXTURE_V,
                    TEXTURE_W, TEXTURE_H, TEXTURE_W, TEXTURE_H, 1, 100);
    } else {
        if (this.controlValue)
            GuiUtils.drawContinuousTexturedBox(this.DarkSkin, this.getLeft(), this.getTop(), 48, TEXTURE_V,
                    TEXTURE_W, TEXTURE_H, TEXTURE_W, TEXTURE_H, 1, 100);
        else
            GuiUtils.drawContinuousTexturedBox(this.DarkSkin, this.getLeft(), this.getTop(), 16, TEXTURE_V,
                    TEXTURE_W, TEXTURE_H, TEXTURE_W, TEXTURE_H, 1, 100);
    }
}