當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。