当前位置: 首页>>代码示例>>Java>>正文


Java Gui.drawModalRectWithCustomSizedTexture方法代码示例

本文整理汇总了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);
}
 
开发者ID:Wurst-Imperium,项目名称:Wurst-MC-1.12,代码行数:27,代码来源:WurstLogo.java

示例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);
}
 
开发者ID:TeamPneumatic,项目名称:pnc-repressurized,代码行数:22,代码来源:WidgetVerticalScrollbar.java

示例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);
    }
}
 
开发者ID:TeamPneumatic,项目名称:pnc-repressurized,代码行数:21,代码来源:WidgetAmadronOffer.java

示例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);
}
 
开发者ID:Wurst-Imperium,项目名称:Wurst-MC-1.12,代码行数:26,代码来源:TacoCmd.java

示例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) {
		;
	}
}
 
开发者ID:Moudoux,项目名称:EMC,代码行数:15,代码来源:RenderUtils.java

示例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);
}
 
开发者ID:CreeperHost,项目名称:CreeperHostGui,代码行数:34,代码来源:GuiGeneralServerInfo.java

示例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);
    }
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:14,代码来源:SpectatorMenu.java

示例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);
    }
}
 
开发者ID:SkidJava,项目名称:BaseClient,代码行数:14,代码来源:SpectatorMenu.java

示例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);
}
 
开发者ID:F1r3w477,项目名称:CustomWorldGen,代码行数:6,代码来源:SpectatorMenu.java

示例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);
}
 
开发者ID:SkidJava,项目名称:BaseClient,代码行数:6,代码来源:TeleportToTeam.java

示例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);
}
 
开发者ID:TeamPneumatic,项目名称:pnc-repressurized,代码行数:6,代码来源:ResourceDrawable.java

示例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);
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:6,代码来源:TeleportToTeam.java

示例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);
}
 
开发者ID:elytra,项目名称:Thermionics,代码行数:7,代码来源:PotionExpedience.java

示例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);
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:6,代码来源:SpectatorMenu.java

示例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);
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:6,代码来源:TeleportToPlayer.java


注:本文中的net.minecraft.client.gui.Gui.drawModalRectWithCustomSizedTexture方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。