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


Java GuiTextField.drawTextBox方法代码示例

本文整理汇总了Java中net.minecraft.client.gui.GuiTextField.drawTextBox方法的典型用法代码示例。如果您正苦于以下问题:Java GuiTextField.drawTextBox方法的具体用法?Java GuiTextField.drawTextBox怎么用?Java GuiTextField.drawTextBox使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在net.minecraft.client.gui.GuiTextField的用法示例。


在下文中一共展示了GuiTextField.drawTextBox方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: drawGuiContainerForegroundLayer

import net.minecraft.client.gui.GuiTextField; //导入方法依赖的package包/类
@SideOnly(Side.CLIENT)
@Override
protected void drawGuiContainerForegroundLayer(int mouseX, int mouseY) {
  for (GuiTextField txt : txtBoxes) {
    if (txt != null) {
      txt.drawTextBox();
    }
  }
  for (GuiButton btn : this.buttonList) {
    if (btn instanceof ButtonVector) {
      ButtonVector btnv = (ButtonVector) btn;
      if (btnv.getFieldId() == Fields.YAW.ordinal()) {
        btnv.enabled = !txtYaw.getText().equals(btnv.getValue() + "");//tile.getYaw();
      }
      else if (btnv.getFieldId() == Fields.ANGLE.ordinal()) {
        btnv.enabled = !txtAngle.getText().equals(btnv.getValue() + "");
      }
    }
  }
  soundBtn.displayString = UtilChat.lang("tile.plate_vector.gui.sound" + tile.getField(Fields.SOUND.ordinal()));
  renderString("tile.plate_vector.gui.power", xPower + 14, yPower + 26);
  renderString("tile.plate_vector.gui.angle", xAngle + 18, yAngle + 26);
  super.drawGuiContainerForegroundLayer(mouseX, mouseY);
}
 
开发者ID:PrinceOfAmber,项目名称:Cyclic,代码行数:25,代码来源:GuiVector.java

示例2: drawScreen

import net.minecraft.client.gui.GuiTextField; //导入方法依赖的package包/类
@Override
public void drawScreen(int mouseX, int mouseY, float renderPartialTicks) {
	GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
	if (Minecraft.getMinecraft().thePlayer.getCurrentArmor(3) != null && Minecraft.getMinecraft().thePlayer.getCurrentArmor(3).getItem() instanceof ItemSmartHelmet)
		if (NBTHelper.hasTag(Minecraft.getMinecraft().thePlayer.getCurrentArmor(3), "identifier")) {
			UUID uuid = UUID.fromString(NBTHelper.getString(Minecraft.getMinecraft().thePlayer.getCurrentArmor(3), "identifier"));
			if (renderStack.containsKey(uuid)) {
				ArrayDeque<HelmetCommand> commands = new ArrayDeque<HelmetCommand>(renderStack.get(uuid));
				while (!commands.isEmpty()) {
					HelmetCommand command = commands.poll();
					if (!(command instanceof AddTextFieldCommand) && !(command instanceof AddButtonCommand))
						command.call(this);
				}
			}
		}
	super.drawScreen(mouseX, mouseY, renderPartialTicks);
	for (GuiTextField text : textFields.values())
		text.drawTextBox();
}
 
开发者ID:austinv11,项目名称:PeripheralsPlusPlus,代码行数:20,代码来源:GuiHelmet.java

示例3: drawScreen

import net.minecraft.client.gui.GuiTextField; //导入方法依赖的package包/类
@Override
public void drawScreen(int i, int j, float f) {
	drawDefaultBackground();
	drawCenteredString(fontRenderer, screenTitle + (isNether ? " (Nether)" : ""), width / 2, 5, 0xffffff);
	
	drawCenteredString(fontRenderer, "Click 'Set' to set a waypoint to your current position.", width / 2, 35, 0x6666ff);
	drawCenteredString(fontRenderer, "Click it again to clear it.", width / 2, 45, 0x6666ff);
	drawCenteredString(fontRenderer, "Or just type coordinates in X, Z, Y format.", width / 2, 65, 0x666666);
	
	for (int k = 0; k < waypointNames.length; k++) {
		GuiTextField field = waypointNames[k];
		if (field != null) {
			field.drawTextBox();
			waypointLocations[k].drawTextBox();
		}
	}
	super.drawScreen(i, j, f);
}
 
开发者ID:uyjulian,项目名称:ControlPack,代码行数:19,代码来源:GuiWaypoints.java

示例4: drawScreen

import net.minecraft.client.gui.GuiTextField; //导入方法依赖的package包/类
public void drawScreen(int i, int j, float k) {
	drawDefaultBackground();
	drawCenteredString(this.fontRendererObj, "Edit Waypoint", this.width / 2, this.height / 4 - 40, Color.WHITE.getRGB());
	for(GuiTextField field : textFieldList) {
		field.drawTextBox();
	}
	this.drawRect(this.width / 2 - 100, this.height / 4 + 109, this.width / 2 + 100, this.height / 4 + 141, Color.BLACK.getRGB());
	this.drawRect(this.width / 2 - 99, this.height / 4 + 110, this.width / 2 + 99, this.height / 4 + 140, new Color(redSlider.getCurrentValue(), greenSlider.getCurrentValue(), blueSlider.getCurrentValue()).getRGB());
	super.drawScreen(i, j, k);
}
 
开发者ID:TealNerd,项目名称:CivRadar,代码行数:11,代码来源:GuiEditWaypoint.java

示例5: drawScreen

import net.minecraft.client.gui.GuiTextField; //导入方法依赖的package包/类
public void drawScreen(int i, int j, float k) {
	drawDefaultBackground();
	drawCenteredString(this.fontRendererObj, "Add Waypoint", this.width / 2, this.height / 4 - 40, Color.WHITE.getRGB());
	for(GuiTextField field : textFieldList) {
		field.drawTextBox();
	}
	this.drawRect(this.width / 2 - 100, this.height / 4 + 109, this.width / 2 + 100, this.height / 4 + 141, Color.BLACK.getRGB());
	this.drawRect(this.width / 2 - 99, this.height / 4 + 110, this.width / 2 + 99, this.height / 4 + 140, new Color(redSlider.getCurrentValue(), greenSlider.getCurrentValue(), blueSlider.getCurrentValue()).getRGB());
	super.drawScreen(i, j, k);
}
 
开发者ID:TealNerd,项目名称:CivRadar,代码行数:11,代码来源:GuiAddWaypoint.java

示例6: drawGuiContainerBackgroundLayer

import net.minecraft.client.gui.GuiTextField; //导入方法依赖的package包/类
@Override
protected void drawGuiContainerBackgroundLayer(float par1, int mouseX, int mouseY) {
  for (GuiTextField f : textFields) {
    f.drawTextBox();
  }
  if (!scrollbars.isEmpty()) {
    for (VScrollbar vs : scrollbars) {
      vs.drawScrollbar(mouseX, mouseY);
    }
  }
  if (!ghostSlotHandler.getGhostSlots().isEmpty()) {
    drawGhostSlots(mouseX, mouseY);
  }
}
 
开发者ID:SleepyTrousers,项目名称:EnderCore,代码行数:15,代码来源:GuiContainerBase.java

示例7: drawScreen

import net.minecraft.client.gui.GuiTextField; //导入方法依赖的package包/类
@Override
public void drawScreen(int mouseX, int mouseY, float renderPartialTicks) {
	GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
	if (Config.useTransparentBackground)
		drawDefaultBackground();
	else
		drawBackground(0);
	mc.fontRenderer.drawString("X",  startTextX, textY-10, Color.WHITE.getRGB(), true);
	mc.fontRenderer.drawString("Y",  startTextX+150, textY-10, Color.WHITE.getRGB(), true);
	mc.fontRenderer.drawString("Z",  startTextX+300, textY-10, Color.WHITE.getRGB(), true);
	super.drawScreen(mouseX, mouseY, renderPartialTicks);
	for (GuiTextField text : textFields.values())
		text.drawTextBox();
}
 
开发者ID:austinv11,项目名称:MacroMaker,代码行数:15,代码来源:GuiWaypoint.java

示例8: drawScreen

import net.minecraft.client.gui.GuiTextField; //导入方法依赖的package包/类
@Override
public void drawScreen(int mouseX, int mouseY, float renderPartialTicks) {
	GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
	if (Config.useTransparentBackground)
		drawDefaultBackground();
	else
		drawBackground(0);
	mc.fontRenderer.drawString(StatCollector.translateToLocal("gui.macro").replace("@[email protected]", Keyboard.getKeyName(Keybindings.seperator.getKeyCode()).toLowerCase()),  startTextX, textY-10, Color.WHITE.getRGB(), true);
	super.drawScreen(mouseX, mouseY, renderPartialTicks);
	for (GuiTextField text : textFields.values())
		text.drawTextBox();
}
 
开发者ID:austinv11,项目名称:MacroMaker,代码行数:13,代码来源:GuiMacro.java

示例9: drawScreen

import net.minecraft.client.gui.GuiTextField; //导入方法依赖的package包/类
@Override
   public void drawScreen(int p_73863_1_, int p_73863_2_, float p_73863_3_) {
	this.drawDefaultBackground();
	for (GuiTextField field : this.textFields) {
		ScaledResolution res = new ScaledResolution(Main.mc, Main.mc.displayWidth, Main.mc.displayHeight);
		field.xPosition = res.getScaledWidth()/2 - res.getScaledWidth()/4;
		field.width = res.getScaledWidth()/2;
		field.drawTextBox();
	}
	super.drawScreen(p_73863_1_, p_73863_2_, p_73863_3_);
}
 
开发者ID:NomNuggetNom,项目名称:mcpvp-mod,代码行数:12,代码来源:GuiEditBlock.java

示例10: drawScreen

import net.minecraft.client.gui.GuiTextField; //导入方法依赖的package包/类
@Override
public void drawScreen(int par1, int par2, float par3) {
	boolean inMoreOptions = ReflectionHelper.getPrivateValue(GuiCreateWorld.class, this, "field_146344_y");
	if (!inMoreOptions) {
		GuiTextField textField = ReflectionHelper.getPrivateValue(GuiCreateWorld.class, this, "field_146333_g");
		String resultFolder = ReflectionHelper.getPrivateValue(GuiCreateWorld.class, this, "field_146336_i");
		String gameModeLine1 = ReflectionHelper.getPrivateValue(GuiCreateWorld.class, this, "field_146323_G");
		String gameModeLine2 = ReflectionHelper.getPrivateValue(GuiCreateWorld.class, this, "field_146328_H");
		
        drawDefaultBackground();
        drawCenteredString(fontRendererObj, LocalizationUtils.translate("selectWorld.create"), width / 2, 20, -1);
        
		drawString(fontRendererObj, LocalizationUtils.translate("selectWorld.enterName"), width / 2 - 100, 47, 0xFFA0A0A0);
		drawString(fontRendererObj, LocalizationUtils.translate("selectWorld.resultFolder") + " " + resultFolder, width / 2 - 100, 85, 0xFFA0A0A0);
		textField.drawTextBox();
		drawString(fontRendererObj, gameModeLine1, width / 2 - 100, 122, 0xFFA0A0A0);
		drawString(fontRendererObj, gameModeLine2, width / 2 - 100, 134, 0xFFA0A0A0);
		
		String regenModeDesc = ((regenMode == EnumPreset.CUSTOM)
				? AdvHealthOptions.config.<String>get(AHOGlobalConfig.generalDescription)
				: (AHOLocalization.REGEN_MODE + "." + regenMode.toString().toLowerCase() + ".desc"));
		regenModeDesc = LocalizationUtils.translate(regenModeDesc);
		drawString(fontRendererObj, regenModeDesc, width / 2 - 100, 172, 0xFFA0A0A0);
		
	    for (int i = 0; i < buttonList.size(); ++i)
	        ((GuiButton)buttonList.get(i)).drawButton(mc, par1, par2);
	    for (int i = 0; i < labelList.size(); ++i)
	        ((GuiLabel)labelList.get(i)).func_146159_a(mc, par1, par2);
	} else super.drawScreen(par1, par2, par3);
}
 
开发者ID:copygirl,项目名称:AdvHealthOptions,代码行数:31,代码来源:AHOGuiCreateWorld.java

示例11: drawScreen

import net.minecraft.client.gui.GuiTextField; //导入方法依赖的package包/类
@Override
public void drawScreen(int par1, int par2, float par3) {
	super.drawScreen(par1, par2, par3);
	GL11.glDisable(GL11.GL_LIGHTING);

	for(GuiTextField textfield : keycodeTextboxes)
		textfield.drawTextBox();
}
 
开发者ID:Geforce132,项目名称:SecurityCraft,代码行数:9,代码来源:GuiBriefcase.java

示例12: drawScreen

import net.minecraft.client.gui.GuiTextField; //导入方法依赖的package包/类
@Override
public void drawScreen(final int mouseX, final int mouseY, final float partialTicks) {
    super.drawScreen(mouseX, mouseY, partialTicks);

    for (final GuiTextField textField : this.textFields) {
        textField.drawTextBox();
    }
}
 
开发者ID:Lunatrius,项目名称:LunatriusCore,代码行数:9,代码来源:GuiScreenBase.java

示例13: drawSecondPart

import net.minecraft.client.gui.GuiTextField; //导入方法依赖的package包/类
@SuppressWarnings("unused")
private void drawSecondPart(int mx, int my)
{
    if((int)currentTranslation == 0 && currentPart.equals("Main"))
        return;
    background :
    {
        GL11.glPushMatrix();
        GL11.glColor4f(1.0f, 1.0f, 1.0f, 1.0f);
        this.mc.renderEngine.bindTexture(secondPartBackgroundTexture);
        int k = (int) (width/2-xSize/2-(currentTranslation));
        int l = height/2-ySize/2-5;
        this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize);
        GL11.glPopMatrix();
    }
    middle:
    {
        for(GuiButton button : secondPart)
        {
            button.drawButton(mc, mx, my);
        }
        for(GuiTextField field : secondPartFields)
        {
            field.drawTextBox();
        }
    }
    
    foreground:
    {
        GL11.glDisable(GL11.GL_LIGHTING);
        GL11.glPushMatrix();
        GL11.glColor4f(1.0f, 1.0f, 1.0f, 1.0f);
        int x = width/2;
        int y = height/2-ySize/2;
        String s1 = getTranslation("ai.waiting");
        if(currentEntry != null)
            s1 = CustomAIHelper.getNameForTask(this.currentEntry.action);
        fontRendererObj.drawStringWithShadow(s1, (int) (x-fontRendererObj.getStringWidth(s1)/2-currentTranslation), y, 0xFFFFFF);
        GL11.glPopMatrix();
        GL11.glEnable(GL11.GL_LIGHTING);
    }
}
 
开发者ID:jglrxavpok,项目名称:CustomAI,代码行数:43,代码来源:GuiCustomAI.java


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