本文整理汇总了Java中com.enderio.core.client.render.ColorUtil类的典型用法代码示例。如果您正苦于以下问题:Java ColorUtil类的具体用法?Java ColorUtil怎么用?Java ColorUtil使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ColorUtil类属于com.enderio.core.client.render包,在下文中一共展示了ColorUtil类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: drawInfo
import com.enderio.core.client.render.ColorUtil; //导入依赖的package包/类
@Override
public void drawInfo(@Nonnull Minecraft minecraft, int recipeWidth, int recipeHeight, int mouseX, int mouseY) {
FontRenderer fr = minecraft.fontRenderer;
String txt = Lang.GUI_COMBGEN_OUTPUT.get("");
int sw = fr.getStringWidth(txt);
fr.drawStringWithShadow(txt, 89 - sw / 2 - xOff, 0 - yOff, ColorUtil.getRGB(Color.WHITE));
txt = "-";
sw = fr.getStringWidth(txt);
fr.drawStringWithShadow("-", 89 - sw / 2 - xOff, 10 - yOff, ColorUtil.getRGB(Color.WHITE));
int y = 21 - yOff - 2;
int x = 114 - xOff;
txt = mathMax.getTicksPerCoolant() + "-" + LangFluid.tMB(mathMin.getTicksPerCoolant());
sw = fr.getStringWidth(txt);
fr.drawStringWithShadow(txt, x - sw / 2 + 7, y + fr.FONT_HEIGHT / 2 + 47, ColorUtil.getRGB(Color.WHITE));
x = 48 - xOff;
txt = mathMax.getTicksPerFuel() + "-" + LangFluid.tMB(mathMin.getTicksPerFuel());
sw = fr.getStringWidth(txt);
fr.drawStringWithShadow(txt, x - sw / 2 + 7, y + fr.FONT_HEIGHT / 2 + 47, ColorUtil.getRGB(Color.WHITE));
GlStateManager.color(1, 1, 1, 1);
}
示例2: drawInfo
import com.enderio.core.client.render.ColorUtil; //导入依赖的package包/类
@Override
public void drawInfo(@Nonnull Minecraft minecraft, int recipeWidth, int recipeHeight, int mouseX, int mouseY) {
FontRenderer fr = minecraft.fontRenderer;
String txt = Lang.GUI_STIRGEN_OUTPUT.get("");
int sw = fr.getStringWidth(txt);
fr.drawStringWithShadow(txt, 89 - sw / 2 - xOff, 10 - yOff, ColorUtil.getRGB(Color.WHITE));
txt = "-";
sw = fr.getStringWidth(txt);
fr.drawStringWithShadow(txt, 89 - sw / 2 - xOff, 22 - yOff, ColorUtil.getRGB(Color.WHITE));
fr.drawStringWithShadow(txt, 89 - sw / 2 - xOff, 68 - yOff, ColorUtil.getRGB(Color.WHITE));
GlStateManager.color(1, 1, 1, 1);
if (stirlingFront != null) {
stirlingFront.draw(minecraft, 129 - xOff, 40 - yOff);
IconEIO.map.render(IconEIO.GENERIC_VERBOTEN, 135 - xOff, 34 - yOff, true);
}
}
示例3: drawGuiContainerBackgroundLayer
import com.enderio.core.client.render.ColorUtil; //导入依赖的package包/类
@Override
public void drawGuiContainerBackgroundLayer(float f, int mx, int my) {
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
bindGuiTexture();
int sx = (width - xSize) / 2;
int sy = (height - ySize) / 2;
drawTexturedModalRect(sx, sy, 0, 0, this.xSize, this.ySize);
int sw = getFontRenderer().getStringWidth(title);
getFontRenderer().drawString(title, width / 2 - sw / 2, sy + 12, ColorUtil.getRGB(Color.red));
ContainerTravelAuth poo = (ContainerTravelAuth) inventorySlots;
if (poo.dirty) {
poo.dirty = false;
failed = false;
}
if (failed) {
drawRect(sx + 43, sy + 27, sx + 43 + 90, sy + 27 + 18, ColorUtil.getARGB(new Color(1f, 0f, 0f, 0.5f)));
}
super.drawGuiContainerBackgroundLayer(f, mx, my);
}
示例4: drawGuiContainerBackgroundLayer
import com.enderio.core.client.render.ColorUtil; //导入依赖的package包/类
@Override
protected void drawGuiContainerBackgroundLayer(float par1, int mouseX, int mouseY) {
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
bindGuiTexture();
int sx = (width - xSize) / 2;
int sy = (height - ySize) / 2;
drawTexturedModalRect(sx, sy, 0, 0, this.xSize, this.ySize);
if (te.hasItemFilter()) {
drawTexturedModalRect(sx + FILTER_LEFT, sy + FILTER_TOP, 0, 238, TileVacuumChest.FILTER_SLOTS * 18, 18);
}
int headerColor = 0x404040;
FontRenderer fr = getFontRenderer();
fr.drawString(headerChest, sx + 7, sy + 6, headerColor);
fr.drawString(headerFilter, sx + 7, sy + 74, headerColor);
fr.drawString(headerRange, sx + xSize - 7 - fr.getStringWidth(headerRange), sy + 74, headerColor);
fr.drawString(headerInventory, sx + 7, sy + 111, headerColor);
IconEIO.map.render(EnderWidget.BUTTON_DOWN, sx + RANGE_LEFT, sy + RANGE_TOP, RANGE_WIDTH, 16, 0, true);
String str = Integer.toString((int) te.getRange());
int sw = fr.getStringWidth(str);
fr.drawString(str, sx + RANGE_LEFT + RANGE_WIDTH - sw - 5, sy + RANGE_TOP + 5, ColorUtil.getRGB(Color.black));
super.drawGuiContainerBackgroundLayer(par1, mouseX, mouseY);
}
示例5: drawGuiContainerBackgroundLayer
import com.enderio.core.client.render.ColorUtil; //导入依赖的package包/类
@Override
protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3) {
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
bindGuiTexture();
int sx = (width - xSize) / 2;
int sy = (height - ySize) / 2;
GlStateManager.enableAlpha();
drawTexturedModalRect(sx, sy, 0, 0, this.xSize, this.ySize);
bindGuiTexture();
super.drawGuiContainerBackgroundLayer(par1, par2, par3);
FontRenderer fr = Minecraft.getMinecraft().fontRenderer;
GlStateManager.disableDepth();
GlStateManager.enableBlend();
fr.drawString("SW", sx + 55, sy + 48, ColorUtil.getARGB(1f, 1f, 0.35f, 1f), true);
fr.drawString("NW", sx + 55, sy + 66, ColorUtil.getARGB(1f, 1f, 0.35f, 1f), true);
fr.drawString("SE", sx + 73, sy + 48, ColorUtil.getARGB(1f, 1f, 0.35f, 1f), true);
fr.drawString("NE", sx + 73, sy + 66, ColorUtil.getARGB(1f, 1f, 0.35f, 1f), true);
GlStateManager.disableBlend();
GlStateManager.enableDepth();
}
示例6: drawGuiContainerBackgroundLayer
import com.enderio.core.client.render.ColorUtil; //导入依赖的package包/类
@Override
protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3) {
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
bindGuiTexture();
int sx = (width - xSize) / 2;
int sy = (height - ySize) / 2;
drawTexturedModalRect(sx, sy, 0, 0, xSize, ySize);
super.drawGuiContainerBackgroundLayer(par1, par2, par3);
if (!getTileEntity().canWork()) {
drawCenteredString(fontRenderer, Lang.GUI_OBELISK_NO_VIALS.get(), width / 2 + 9, sy + 68, ColorUtil.getRGB(Color.red));
} else {
int range = (int) getTileEntity().getRange();
drawCenteredString(fontRenderer, Lang.GUI_RANGE.get(range), width / 2 + 9, sy + 68, ColorUtil.getRGB(Color.white));
}
}
示例7: render
import com.enderio.core.client.render.ColorUtil; //导入依赖的package包/类
@Override
public void render(float partialTick, int mouseX, int mouseY) {
newChannelTF.drawTextBox();
channelList.drawScreen(mouseX, mouseY, partialTick);
sendChannels.drawScreen(mouseX, mouseY, partialTick);
recieveChannels.drawScreen(mouseX, mouseY, partialTick);
int left = parent.getGuiLeft();
int top = parent.getGuiTop();
int x = left + 59;
int y = top + 36;
parent.drawCenteredString(parent.getFontRenderer(), Lang.GUI_TRANS_AVAILABLE.get(), x, y, ColorUtil.getRGB(Color.white));
x = left + 199;
parent.drawCenteredString(parent.getFontRenderer(), Lang.GUI_TRANS_SEND.get(), x, y, ColorUtil.getRGB(Color.white));
y += 56;
parent.drawCenteredString(parent.getFontRenderer(), Lang.GUI_TRANS_RECEIVE.get(), x, y, ColorUtil.getRGB(Color.white));
}
示例8: render
import com.enderio.core.client.render.ColorUtil; //导入依赖的package包/类
@Override
public void render(float par1, int par2, int par3) {
FontRenderer fr = gui.getFontRenderer();
int rgb = ColorUtil.getRGB(Color.darkGray);
int x = left;
int y = gui.getGuiTop() + 13;
gui.getFontRenderer().drawString(modeLabel, x, y, rgb);
String modeString = con.getConnectionMode(gui.getDir()).getLocalisedName();
x += gap + leftArrow.getWidth() + fr.getStringWidth(modeLabel) + gap;
GlStateManager.color(1, 1, 1);
IconEIO.MODE_BACKGROUND.getMap().render(IconEIO.MODE_BACKGROUND, x - gap, y - (fr.FONT_HEIGHT / 2) - 1, getLongestModeStringWidth() + gap * 2,
leftArrow.getHeight(), 0, true);
int move = (getLongestModeStringWidth() - fr.getStringWidth(modeString)) / 2;
x += move;
rgb = ColorUtil.getRGB(Color.white);
gui.getFontRenderer().drawString(modeString, x, y, rgb);
renderCustomOptions(y + gap + fr.FONT_HEIGHT + gap, par1, par2, par3);
}
示例9: renderCustomOptions
import com.enderio.core.client.render.ColorUtil; //导入依赖的package包/类
@Override
protected void renderCustomOptions(int top, float par1, int par2, int par3) {
ConnectionMode mode = con.getConnectionMode(gui.getDir());
if (mode == ConnectionMode.DISABLED) {
return;
}
FontRenderer fr = gui.getFontRenderer();
String heading = getHeading();
int x = 0;
int rgb = ColorUtil.getRGB(Color.darkGray);
fr.drawString(heading, left + x, top, rgb);
boolean outputActive = (mode == ConnectionMode.IN_OUT && !inOutShowIn) || (mode == ConnectionMode.OUTPUT);
if (outputActive) {
GL11.glColor3f(1, 1, 1);
IconEIO.map.render(EnderWidget.BUTTON_DOWN, left + priLeft, top - 5, priWidth, 16, 0, true);
String str = itemConduit.getOutputPriority(gui.getDir()) + "";
int sw = fr.getStringWidth(str);
fr.drawString(str, left + priLeft + priWidth - sw - gap, top, ColorUtil.getRGB(Color.black));
}
if (filterGui != null) {
filterGui.renderCustomOptions(top, par1, par2, par3);
}
}
示例10: drawTexts
import com.enderio.core.client.render.ColorUtil; //导入依赖的package包/类
protected void drawTexts(int sx, int sy) {
int rgb = ColorUtil.getRGB(Color.white);
switch (tab) {
case 0:
fontRendererObj.drawStringWithShadow(EnderIOAddons.lang.localize("afarm.gui.tab0.modules"), sx + 34, sy + 7, rgb);
fontRendererObj.drawStringWithShadow(EnderIOAddons.lang.localize("afarm.gui.tab0.modulestorage"), sx + 34, sy + 35, rgb);
break;
case 1:
if (getTileEntity().twoGhosts()) {
fontRendererObj.drawStringWithShadow(EnderIOAddons.lang.localize("afarm.gui.tab1.seed1"), sx + 34, sy + 7, rgb);
fontRendererObj.drawStringWithShadow(EnderIOAddons.lang.localize("afarm.gui.tab1.seed2"), sx + 88, sy + 7, rgb);
} else {
fontRendererObj.drawStringWithShadow(EnderIOAddons.lang.localize("afarm.gui.tab1.nw"), sx + 34, sy + 7, rgb);
fontRendererObj.drawStringWithShadow(EnderIOAddons.lang.localize("afarm.gui.tab1.ne"), sx + 61, sy + 7, rgb);
fontRendererObj.drawStringWithShadow(EnderIOAddons.lang.localize("afarm.gui.tab1.se"), sx + 88, sy + 7, rgb);
fontRendererObj.drawStringWithShadow(EnderIOAddons.lang.localize("afarm.gui.tab1.sw"), sx + 115, sy + 7, rgb);
}
fontRendererObj.drawStringWithShadow(EnderIOAddons.lang.localize("afarm.gui.tab1.seedstorage"), sx + 34, sy + 35, rgb);
break;
case 2:
fontRendererObj.drawStringWithShadow(EnderIOAddons.lang.localize("afarm.gui.tab2.output"), sx + 34, sy + 7, rgb);
break;
case 3:
fontRendererObj.drawStringWithShadow(EnderIOAddons.lang.localize("afarm.gui.tab3.cropsticks"), sx + 34, sy + 7, rgb);
fontRendererObj.drawStringWithShadow(EnderIOAddons.lang.localize("afarm.gui.tab3.tools"), sx + 34, sy + 35, rgb);
fontRendererObj.drawStringWithShadow(EnderIOAddons.lang.localize("afarm.gui.tab3.fertilizer"), sx + 88, sy + 35, rgb);
fontRendererObj.drawStringWithShadow(EnderIOAddons.lang.localize("afarm.gui.tab3.till"), sx + 34 + 16 + 3, sy + 62 + 4, rgb);
break;
}
RenderUtil.bindTexture(texture);
}
示例11: drawExtras
import com.enderio.core.client.render.ColorUtil; //导入依赖的package包/类
@Override
public void drawExtras(int recipeIndex) {
if (((TeaserRecipe) arecipes.get(recipeIndex)).textKey != null) {
GuiDraw.fontRenderer.drawSplitString(EnderIOAddons.lang.localize(((TeaserRecipe) arecipes.get(recipeIndex)).textKey), 5, 16 + 18 + 6 - yOff, 160,
ColorUtil.getRGB(Color.darkGray));
}
}
示例12: drawInfo
import com.enderio.core.client.render.ColorUtil; //导入依赖的package包/类
@Override
public void drawInfo(@Nonnull Minecraft minecraft, int recipeWidth, int recipeHeight, int mouseX, int mouseY) {
FontRenderer fr = minecraft.fontRenderer;
String txt = Lang.GUI_ZOMBGEN_OUTPUT.get("");
fr.drawStringWithShadow(txt, 10, 3, ColorUtil.getRGB(Color.WHITE));
txt = LangFluid.tMB(ZombieGenConfig.ticksPerBucketOfFuel.get() / 1000);
int sw = fr.getStringWidth(txt);
fr.drawStringWithShadow(txt, recipeWidth / 2 - sw / 2, 14 + 47 + fr.FONT_HEIGHT / 2, ColorUtil.getRGB(Color.WHITE));
GlStateManager.color(1, 1, 1, 1);
}
示例13: drawInfo
import com.enderio.core.client.render.ColorUtil; //导入依赖的package包/类
@Override
public void drawInfo(@Nonnull Minecraft minecraft, int recipeWidth, int recipeHeight, int mouseX, int mouseY) {
GlStateManager.enableBlend(); // Fix for GlState varying with mouse position (JEI bug)
sun.draw(minecraft, 77 - 16, 0);
FontRenderer fr = minecraft.fontRenderer;
String txt = Lang.JEI_SOLAR_OUTPUT.get();
int sw = fr.getStringWidth(txt);
fr.drawStringWithShadow(txt, recipeWidth / 2 - sw / 2, 68, ColorUtil.getRGB(Color.WHITE));
GlStateManager.color(1, 1, 1, 1);
}
示例14: drawGuiContainerBackgroundLayer
import com.enderio.core.client.render.ColorUtil; //导入依赖的package包/类
@Override
protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3) {
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
bindGuiTexture(isSimple ? 1 : 0);
int sx = (width - xSize) / 2;
int sy = (height - ySize) / 2;
drawTexturedModalRect(sx, sy, 0, 0, this.xSize, this.ySize);
int scaled;
if (shouldRenderProgress()) {
scaled = getProgressScaled(12);
drawTexturedModalRect(sx + 80, sy + 64 - scaled, 176, 12 - scaled, 14, scaled + 2);
}
super.drawGuiContainerBackgroundLayer(par1, par2, par3);
FontRenderer fr = getFontRenderer();
int y = guiTop + fr.FONT_HEIGHT / 2 + 3;
int output = 0;
if (getTileEntity().isActive()) {
output = getTileEntity().getPowerUsePerTick();
}
String txt = Lang.GUI_STIRGEN_OUTPUT.get(LangPower.RFt(output));
int sw = fr.getStringWidth(txt);
fr.drawStringWithShadow(txt, guiLeft + xSize / 2 - sw / 2, y, ColorUtil.getRGB(Color.WHITE));
txt = Lang.GUI_STIRGEN_RATE
.get(Math.round(getTileEntity().getBurnTimeMultiplier() / TileStirlingGenerator.getBurnTimeMultiplier(DefaultCapacitorData.BASIC_CAPACITOR) * 100));
sw = fr.getStringWidth(txt);
y += fr.FONT_HEIGHT + 3;
fr.drawStringWithShadow(txt, guiLeft + xSize / 2 - sw / 2, y, ColorUtil.getRGB(Color.WHITE));
}
示例15: drawGuiContainerBackgroundLayer
import com.enderio.core.client.render.ColorUtil; //导入依赖的package包/类
@Override
protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3) {
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
bindGuiTexture();
int sx = (width - xSize) / 2;
int sy = (height - ySize) / 2;
drawTexturedModalRect(sx, sy, 0, 0, xSize, ySize);
TileZombieGenerator gen = getTileEntity();
FontRenderer fr = getFontRenderer();
int output = 0;
if (gen.isActive()) {
output = gen.getPowerUsePerTick();
}
String txt = Lang.GUI_ZOMBGEN_OUTPUT.get(LangPower.RFt(output));
int sw = fr.getStringWidth(txt);
fr.drawStringWithShadow(txt, guiLeft + xSize / 2 - sw / 2, guiTop + fr.FONT_HEIGHT / 2 + 3, ColorUtil.getRGB(Color.WHITE));
int x = guiLeft + 80;
int y = guiTop + 21;
if (!gen.tank.isEmpty()) {
RenderUtil.renderGuiTank(gen.tank.getFluid(), gen.tank.getCapacity(), gen.tank.getFluidAmount(), x, y, zLevel, 16, 47);
if (gen.isActive()) {
txt = LangFluid.tMB(ZombieGenConfig.ticksPerBucketOfFuel.get() / 1000);
sw = fr.getStringWidth(txt);
fr.drawStringWithShadow(txt, x - sw / 2 + 7, y + fr.FONT_HEIGHT / 2 + 46, ColorUtil.getRGB(Color.WHITE));
}
}
bindGuiTexture();
super.drawGuiContainerBackgroundLayer(par1, par2, par3);
}