本文整理汇总了Java中net.minecraft.client.gui.Gui.drawModalRectWithCustomSizedTexture方法的典型用法代码示例。如果您正苦于以下问题:Java Gui.drawModalRectWithCustomSizedTexture方法的具体用法?Java Gui.drawModalRectWithCustomSizedTexture怎么用?Java Gui.drawModalRectWithCustomSizedTexture使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.minecraft.client.gui.Gui
的用法示例。
在下文中一共展示了Gui.drawModalRectWithCustomSizedTexture方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: render
import net.minecraft.client.gui.Gui; //导入方法依赖的package包/类
public void render()
{
String version = getVersionString();
// draw version background
GL11.glEnable(GL11.GL_BLEND);
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
if(WurstClient.INSTANCE.mods.rainbowUiMod.isActive())
{
float[] acColor = WurstClient.INSTANCE.getGui().getAcColor();
GL11.glColor4f(acColor[0], acColor[1], acColor[2], 0.5F);
}else
GL11.glColor4f(1, 1, 1, 0.5F);
drawQuads(0, 6, Fonts.segoe22.getStringWidth(version) + 76, 18);
// draw version string
GL11.glEnable(GL11.GL_TEXTURE_2D);
GL11.glEnable(GL11.GL_CULL_FACE);
GL11.glDisable(GL11.GL_DEPTH_TEST);
Fonts.segoe22.drawString(version, 74, 4, 0xFF000000);
// draw Wurst logo
GL11.glColor4f(1, 1, 1, 1);
Minecraft.getMinecraft().getTextureManager().bindTexture(texture);
Gui.drawModalRectWithCustomSizedTexture(0, 3, 0, 0, 72, 18, 72, 18);
}
示例2: render
import net.minecraft.client.gui.Gui; //导入方法依赖的package包/类
@Override
public void render(int mouseX, int mouseY, float partialTick) {
GL11.glColor4d(1, 1, 1, 1);
if (!Mouse.isButtonDown(0)) dragging = false;
if (!wasClicking && Mouse.isButtonDown(0) && getBounds().contains(mouseX, mouseY)) {
dragging = true;
}
if (!enabled) dragging = false;
wasClicking = Mouse.isButtonDown(0);
if (dragging) currentScroll = (float) (mouseY - 7 - getBounds().y) / (getBounds().height - 17);
currentScroll = MathHelper.clamp(currentScroll, 0, 1);
Minecraft.getMinecraft().getTextureManager().bindTexture(scrollTexture);
Gui.drawModalRectWithCustomSizedTexture(x, y, 12, 0, getBounds().width, 1, 26, 15);
for (int i = 0; i < getBounds().height - 2; i++)
Gui.drawModalRectWithCustomSizedTexture(x, y + 1 + i, 12, 1, getBounds().width, 1, 26, 15);
Gui.drawModalRectWithCustomSizedTexture(x, y + getBounds().height - 1, 12, 14, getBounds().width, 1, 26, 15);
if (!enabled) GL11.glColor4d(0.6, 0.6, 0.6, 1);
Gui.drawModalRectWithCustomSizedTexture(x + 1, y + 1 + (int) ((getBounds().height - 17) * currentScroll), 0, 0, 12, 15, 26, 15);
GL11.glColor4d(1, 1, 1, 1);
}
示例3: render
import net.minecraft.client.gui.Gui; //导入方法依赖的package包/类
@Override
public void render(int mouseX, int mouseY, float partialTick) {
if (renderBackground) {
Minecraft.getMinecraft().getTextureManager().bindTexture(Textures.WIDGET_AMADRON_OFFER);
GlStateManager.color(1f, canBuy ? 1f : 0.4f, canBuy ? 1f : 0.4f, 1f);
Gui.drawModalRectWithCustomSizedTexture(x, y, 0, 0, getBounds().width, getBounds().height, 256, 256);
}
for (IGuiWidget widget : widgets) {
widget.render(mouseX, mouseY, partialTick);
}
Minecraft.getMinecraft().fontRenderer.drawString(offer.getVendor(), x + 2, y + 2, 0xFF000000);
boolean customOffer = offer instanceof AmadronOfferCustom;
if (shoppingAmount > 0) {
Minecraft.getMinecraft().fontRenderer.drawString(TextFormatting.BLACK.toString() + shoppingAmount, x + 36 - Minecraft.getMinecraft().fontRenderer.getStringWidth("" + shoppingAmount) / 2, y + (customOffer ? 15 : 20), 0xFF000000);
}
if (customOffer) {
AmadronOfferCustom custom = (AmadronOfferCustom) offer;
Minecraft.getMinecraft().fontRenderer.drawString(TextFormatting.DARK_BLUE.toString() + custom.getStock(), x + 36 - Minecraft.getMinecraft().fontRenderer.getStringWidth("" + custom.getStock()) / 2, y + 25, 0xFF000000);
}
}
示例4: onRenderGUI
import net.minecraft.client.gui.Gui; //导入方法依赖的package包/类
@Override
public void onRenderGUI()
{
GL11.glEnable(GL11.GL_BLEND);
GL11.glDisable(GL11.GL_CULL_FACE);
GL11.glEnable(GL11.GL_TEXTURE_2D);
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
if(WurstClient.INSTANCE.mods.rainbowUiMod.isActive())
{
float[] acColor = WurstClient.INSTANCE.getGui().getAcColor();
GL11.glColor4f(acColor[0], acColor[1], acColor[2], 1);
}else
GL11.glColor4f(1, 1, 1, 1);
mc.getTextureManager().bindTexture(tacos[ticks / 8]);
ScaledResolution sr = new ScaledResolution(mc);
int x = sr.getScaledWidth() / 2 - 32 + 76;
int y = sr.getScaledHeight() - 32 - 19;
int w = 64;
int h = 32;
Gui.drawModalRectWithCustomSizedTexture(x, y, 0, 0, w, h, w, h);
GL11.glEnable(GL11.GL_CULL_FACE);
GL11.glDisable(GL11.GL_BLEND);
}
示例5: drawAltFace
import net.minecraft.client.gui.Gui; //导入方法依赖的package包/类
public static void drawAltFace(String name, int x, int y, int w, int h, boolean selected) {
try {
AbstractClientPlayer.getDownloadImageSkin(AbstractClientPlayer.getLocationSkin(name), name)
.loadTexture(Minecraft.getMinecraft().getResourceManager());
Minecraft.getMinecraft().getTextureManager().bindTexture(AbstractClientPlayer.getLocationSkin(name));
glEnable(GL_BLEND);
glColor4f(0.9F, 0.9F, 0.9F, 1.0F);
Gui.drawModalRectWithCustomSizedTexture(x, y, 24, 24, w, h, 192, 192);
Gui.drawModalRectWithCustomSizedTexture(x, y, 120, 24, w, h, 192, 192);
glDisable(GL_BLEND);
} catch (Exception e) {
;
}
}
示例6: drawScreen
import net.minecraft.client.gui.Gui; //导入方法依赖的package包/类
@Override
public void drawScreen(int mouseX, int mouseY, float partialTicks)
{
this.drawDefaultBackground();
super.drawScreen(mouseX, mouseY, partialTicks);
this.drawCenteredString(this.fontRendererObj, Util.localize("info.server_name"), this.width / 2, this.height / 2 - 65, -1);
int colour;
if (nameChecked && isAcceptable)
{
colour = 0x00FF00;
}
else
{
colour = 0xFF0000;
}
this.mc.getTextureManager().bindTexture(lockIcon);
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
Gui.drawModalRectWithCustomSizedTexture((this.width / 2) - 8, (this.height / 2) + 40, 0.0F, 0.0F, 16, 16, 16.0F, 16.0F);
int strStart = 61;
this.drawCenteredString(fontRendererObj, Util.localize("secure.line1"), this.width / 2, (this.height / 2) + strStart, 0xFFFFFF);
this.drawCenteredString(fontRendererObj, Util.localize("secure.line2"), this.width / 2, (this.height / 2) + strStart + 10, 0xFFFFFF);
this.drawCenteredString(fontRendererObj, Util.localize("secure.line3"), this.width / 2, (this.height / 2) + strStart + 20, 0xFFFFFF);
this.nameField.drawTextBox();
this.drawCenteredString(fontRendererObj, message, (this.width / 2), (this.height / 2) - 26, colour);
}
示例7: renderIcon
import net.minecraft.client.gui.Gui; //导入方法依赖的package包/类
public void renderIcon(float p_178663_1_, int alpha)
{
Minecraft.getMinecraft().getTextureManager().bindTexture(GuiSpectator.SPECTATOR_WIDGETS);
if (this.direction < 0)
{
Gui.drawModalRectWithCustomSizedTexture(0, 0, 144.0F, 0.0F, 16, 16, 256.0F, 256.0F);
}
else
{
Gui.drawModalRectWithCustomSizedTexture(0, 0, 160.0F, 0.0F, 16, 16, 256.0F, 256.0F);
}
}
示例8: func_178663_a
import net.minecraft.client.gui.Gui; //导入方法依赖的package包/类
public void func_178663_a(float p_178663_1_, int alpha)
{
Minecraft.getMinecraft().getTextureManager().bindTexture(GuiSpectator.field_175269_a);
if (this.field_178666_a < 0)
{
Gui.drawModalRectWithCustomSizedTexture(0, 0, 144.0F, 0.0F, 16, 16, 256.0F, 256.0F);
}
else
{
Gui.drawModalRectWithCustomSizedTexture(0, 0, 160.0F, 0.0F, 16, 16, 256.0F, 256.0F);
}
}
示例9: renderIcon
import net.minecraft.client.gui.Gui; //导入方法依赖的package包/类
public void renderIcon(float p_178663_1_, int alpha)
{
Minecraft.getMinecraft().getTextureManager().bindTexture(GuiSpectator.SPECTATOR_WIDGETS);
Gui.drawModalRectWithCustomSizedTexture(0, 0, 128.0F, 0.0F, 16, 16, 256.0F, 256.0F);
}
示例10: func_178663_a
import net.minecraft.client.gui.Gui; //导入方法依赖的package包/类
public void func_178663_a(float p_178663_1_, int alpha)
{
Minecraft.getMinecraft().getTextureManager().bindTexture(GuiSpectator.field_175269_a);
Gui.drawModalRectWithCustomSizedTexture(0, 0, 16.0F, 0.0F, 16, 16, 256.0F, 256.0F);
}
示例11: draw
import net.minecraft.client.gui.Gui; //导入方法依赖的package包/类
@Override
public void draw(Minecraft minecraft, int xOffset, int yOffset) {
minecraft.getTextureManager().bindTexture(resource);
Gui.drawModalRectWithCustomSizedTexture(x + xOffset, y + yOffset, u, v, drawWidth, drawHeight, texWidth, texHeight);
}
示例12: renderIcon
import net.minecraft.client.gui.Gui; //导入方法依赖的package包/类
public void renderIcon(float p_178663_1_, int alpha)
{
Minecraft.getMinecraft().getTextureManager().bindTexture(GuiSpectator.SPECTATOR_WIDGETS);
Gui.drawModalRectWithCustomSizedTexture(0, 0, 16.0F, 0.0F, 16, 16, 256.0F, 256.0F);
}
示例13: renderInventoryEffect
import net.minecraft.client.gui.Gui; //导入方法依赖的package包/类
@SideOnly(Side.CLIENT)
public void renderInventoryEffect(int x, int y, PotionEffect effect, net.minecraft.client.Minecraft mc) {
mc.renderEngine.bindTexture(TEXTURE_EXPEDIENCE);
GlStateManager.color(1, 1, 1);
Gui.drawModalRectWithCustomSizedTexture(x+6, y+7, 0, 0, 18, 18, 18, 18);
}
示例14: func_178663_a
import net.minecraft.client.gui.Gui; //导入方法依赖的package包/类
public void func_178663_a(float p_178663_1_, int alpha)
{
Minecraft.getMinecraft().getTextureManager().bindTexture(GuiSpectator.field_175269_a);
Gui.drawModalRectWithCustomSizedTexture(0, 0, 128.0F, 0.0F, 16, 16, 256.0F, 256.0F);
}
示例15: renderIcon
import net.minecraft.client.gui.Gui; //导入方法依赖的package包/类
public void renderIcon(float p_178663_1_, int alpha)
{
Minecraft.getMinecraft().getTextureManager().bindTexture(GuiSpectator.SPECTATOR_WIDGETS);
Gui.drawModalRectWithCustomSizedTexture(0, 0, 0.0F, 0.0F, 16, 16, 256.0F, 256.0F);
}