本文整理匯總了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);
}
示例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();
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
}
示例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();
}
示例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();
}
示例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_);
}
示例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);
}
示例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();
}
示例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();
}
}
示例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);
}
}