Example usage for org.lwjgl.opengl GL11 glColor4f

List of usage examples for org.lwjgl.opengl GL11 glColor4f

Introduction

In this page you can find the example usage for org.lwjgl.opengl GL11 glColor4f.

Prototype

public static native void glColor4f(@NativeType("GLfloat") float red, @NativeType("GLfloat") float green,
        @NativeType("GLfloat") float blue, @NativeType("GLfloat") float alpha);

Source Link

Document

Float version of #glColor4b Color4b

Usage

From source file:buildcraft.silicon.gui.GuiAssemblyTable.java

License:Minecraft Mod Public

@Override
protected void drawGuiContainerBackgroundLayer(float f, int x, int y) {
    GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
    mc.renderEngine.bindTexture(TEXTURE);
    int cornerX = (width - xSize) / 2;
    int cornerY = (height - ySize) / 2;
    drawTexturedModalRect(cornerX, cornerY, 0, 0, xSize, ySize);

    updateRecipes();/*from  w w w  . j ava  2 s .c o m*/

    for (AdvancedSlot slot2 : slots) {
        RecipeSlot slot = (RecipeSlot) slot2;

        if (table.isAssembling(slot.recipe)) {
            drawTexturedModalRect(cornerX + slot.x, cornerY + slot.y, 196, 1, 16, 16);
        } else if (table.isPlanned(slot.recipe)) {
            drawTexturedModalRect(cornerX + slot.x, cornerY + slot.y, 177, 1, 16, 16);
        }
    }

    int h = table.getProgressScaled(70);

    drawTexturedModalRect(cornerX + 95, cornerY + 36 + 70 - h, 176, 18, 4, h);

    drawBackgroundSlots();
}

From source file:buildcraft.silicon.gui.GuiAssemblyTableOld.java

License:Minecraft Mod Public

@Override
protected void drawGuiContainerBackgroundLayer(float f, int x, int y) {
    GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
    mc.renderEngine.bindTexture(TEXTURE);
    drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize);

    updateRecipes();/*from ww  w  .ja  v a  2  s  . c  om*/

    for (AdvancedSlot slot2 : slots) {
        RecipeSlot slot = (RecipeSlot) slot2;

        if (slot.crafting != null) {
            if (!slot.craftable) {
                drawTexturedModalRect(guiLeft + slot.x, guiTop + slot.y, 215, 1, 16, 16);
            } else if (table.isAssembling(slot.crafting.recipe)) {
                drawTexturedModalRect(guiLeft + slot.x, guiTop + slot.y, 196, 1, 16, 16);
            } else if (table.isPlanned(slot.crafting.recipe)) {
                drawTexturedModalRect(guiLeft + slot.x, guiTop + slot.y, 177, 1, 16, 16);
            }
        }
    }

    int h = table.getProgressScaled(70);

    drawTexturedModalRect(guiLeft + 86, guiTop + 36 + 70 - h, 176, 18, 4, h);

    drawBackgroundSlots(x, y);
}

From source file:buildcraft.silicon.gui.GuiIntegrationTable.java

License:Minecraft Mod Public

@Override
protected void drawGuiContainerBackgroundLayer(float f, int mouseX, int mouseY) {
    super.drawGuiContainerBackgroundLayer(f, mouseX, mouseY);
    GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
    mc.renderEngine.bindTexture(TEXTURE);
    int cornerX = (width - xSize) / 2;
    int cornerY = (height - ySize) / 2;
    if (integrationTable.getEnergy() > 0) {
        int progress = integrationTable.getProgressScaled(98);
        drawTexturedModalRect(cornerX + 13, cornerY + 40, 0, flash ? 197 : 221, progress, 24);
    }/*from   www. j  av a 2 s .c o  m*/
}

From source file:buildcraft.silicon.gui.GuiIntegrationTableOld.java

License:Minecraft Mod Public

@Override
protected void drawGuiContainerBackgroundLayer(float f, int mouseX, int mouseY) {
    super.drawGuiContainerBackgroundLayer(f, mouseX, mouseY);
    GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
    mc.renderEngine.bindTexture(TEXTURE);
    if (integrationTable.getEnergy() > 0) {
        int h = table.getProgressScaled(69);
        drawTexturedModalRect(guiLeft + 164, guiTop + 18 + 74 - h, 176, 18, 4, h);
    }/*  w  w w  .j a v  a 2  s .  c o  m*/
    if (integrationTable.getMaxExpansionCount() > 0) {
        for (int i = 8; i > integrationTable.getMaxExpansionCount(); i--) {
            drawTexturedModalRect(guiLeft + ContainerIntegrationTable.SLOT_X[i] - 1,
                    guiTop + ContainerIntegrationTable.SLOT_Y[i] - 1, 180, 17, 18, 18);
        }
    }
}

From source file:buildcraft.silicon.gui.GuiPackager.java

License:Minecraft Mod Public

@Override
protected void drawGuiContainerBackgroundLayer(float f, int mouseX, int mouseY) {
    GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
    mc.renderEngine.bindTexture(TEXTURE);
    drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize);
    for (int y = 0; y < 3; y++) {
        for (int x = 0; x < 3; x++) {
            if (bench.isPatternSlotSet(y * 3 + x)) {
                drawTexturedModalRect(guiLeft + 29 + x * 18, guiTop + 16 + y * 18, xSize, 0, 18, 18);
            }//w w  w  .j a  v a 2  s  . c o m
        }
    }
}

From source file:buildcraft.silicon.gui.GuiProgrammingTable.java

License:Minecraft Mod Public

@Override
protected void drawGuiContainerBackgroundLayer(float f, int x, int y) {
    GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
    mc.renderEngine.bindTexture(TEXTURE);
    drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize);

    updateRecipes();//from  w  w w. j  a  va2  s . com

    int i = 0;

    for (AdvancedSlot slot2 : slots) {
        RecipeSlot slot = (RecipeSlot) slot2;

        if (slot.slot != null) {
            if (table.optionId == i) {
                drawTexturedModalRect(guiLeft + slot.x, guiTop + slot.y, 196, 1, 16, 16);
            }
        }
        i++;
    }

    int h = table.getProgressScaled(70);

    drawTexturedModalRect(guiLeft + 164, guiTop + 36 + 70 - h, 176, 18, 4, h);

    drawBackgroundSlots();
}

From source file:buildcraft.silicon.gui.GuiStampingTable.java

License:Minecraft Mod Public

@Override
protected void drawGuiContainerBackgroundLayer(float f, int mouseX, int mouseY) {
    super.drawGuiContainerBackgroundLayer(f, mouseX, mouseY);
    GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
    mc.renderEngine.bindTexture(TEXTURE);
    if (integrationTable.getEnergy() > 0) {
        int progress = integrationTable.getProgressScaled(98);
        drawTexturedModalRect(guiLeft + 36, guiTop + 14, 0, flash ? 197 : 221, progress, 24);
    }//from   www  .j a  v a 2  s  .c  o  m
}

From source file:buildcraft.silicon.GuiAssemblyTable.java

License:Minecraft Mod Public

@Override
protected void drawGuiContainerBackgroundLayer(float f, int x, int y) {
    int i = mc.renderEngine.getTexture(DefaultProps.TEXTURE_PATH_GUI + "/assembly_table.png");
    GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
    mc.renderEngine.bindTexture(i);/* w w  w . j  a  v  a 2s .c  om*/
    int cornerX = (width - xSize) / 2;
    int cornerY = (height - ySize) / 2;
    drawTexturedModalRect(cornerX, cornerY, 0, 0, xSize, ySize);

    updateRecipes();

    for (int s = 0; s < slots.length; ++s) {
        RecipeSlot slot = (RecipeSlot) slots[s];

        if (assemblyTable.isAssembling(slot.recipe))
            drawTexturedModalRect(cornerX + slot.x, cornerY + slot.y, 196, 1, 16, 16);
        else if (assemblyTable.isPlanned(slot.recipe))
            drawTexturedModalRect(cornerX + slot.x, cornerY + slot.y, 177, 1, 16, 16);
    }

    int height = (int) assemblyTable.getCompletionRatio(70);

    drawTexturedModalRect(cornerX + 95, cornerY + 36 + 70 - height, 176, 18, 4, height);

    drawBackgroundSlots();
}

From source file:buildcraft.transport.gui.GuiFilteredBuffer.java

License:Minecraft Mod Public

@Override
protected void drawGuiContainerBackgroundLayer(float f, int x, int y) {
    GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);

    mc.renderEngine.bindTexture(TEXTURE);
    int cornerX = (width - xSize) / 2;
    int cornerY = (height - ySize) / 2;

    drawTexturedModalRect(cornerX, cornerY, 0, 0, xSize, ySize);

    IInventory filters = filteredBuffer.getFilters();

    for (int col = 0; col < filters.getSizeInventory(); col++) {
        if (filters.getStackInSlot(col) == null) {
            drawTexturedModalRect(cornerX + 7 + col * 18, cornerY + 60, 176, 0, 18, 18);
        }/*from   w w w  .j  a  v  a  2  s  .  co m*/
    }
}

From source file:buildcraft.transport.gui.GuiFilteredBufferOld.java

License:Minecraft Mod Public

@Override
protected void drawGuiContainerBackgroundLayer(float f, int x, int y) {
    GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);

    mc.renderEngine.bindTexture(TEXTURE);

    drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize);

    IInventory filters = filteredBuffer.getFilters();

    for (int col = 0; col < filters.getSizeInventory(); col++) {
        if (filters.getStackInSlot(col) == null) {
            drawTexturedModalRect(guiLeft + 7 + col * 18, guiTop + 60, 176, 0, 18, 18);
        }/*  w w  w  . j a v a  2  s  .  c  o m*/
    }
}