本文整理匯總了Java中net.minecraft.client.gui.GuiTextField.setDisabledTextColour方法的典型用法代碼示例。如果您正苦於以下問題:Java GuiTextField.setDisabledTextColour方法的具體用法?Java GuiTextField.setDisabledTextColour怎麽用?Java GuiTextField.setDisabledTextColour使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類net.minecraft.client.gui.GuiTextField
的用法示例。
在下文中一共展示了GuiTextField.setDisabledTextColour方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: initGui
import net.minecraft.client.gui.GuiTextField; //導入方法依賴的package包/類
@Override
public void initGui()
{
super.initGui();
Keyboard.enableRepeatEvents(true);
int i = (width - xSize) / 2;
int j = (height - ySize) / 2;
itemNameField = new GuiTextField(fontRendererObj, i + 62, j + 24, 103, 12);
itemNameField.setTextColor(-1);
itemNameField.setDisabledTextColour(-1);
itemNameField.setEnableBackgroundDrawing(false);
itemNameField.setMaxStringLength(30);
inventorySlots.removeCraftingFromCrafters(this);
inventorySlots.addCraftingToCrafters(this);
}
示例2: initGui
import net.minecraft.client.gui.GuiTextField; //導入方法依賴的package包/類
@Override
public void initGui(){
super.initGui();
Keyboard.enableRepeatEvents(true);
buttonList.add(confirmButton = new GuiButton(0, width / 2 - 52, height / 2 + 52, 100, 20, ClientUtils.localize("gui.universalKeyChanger.confirm")));
confirmButton.enabled = false;
textboxNewPasscode = new GuiTextField(0, fontRendererObj, width / 2 - 57, height / 2 - 47, 110, 12);
textboxNewPasscode.setTextColor(-1);
textboxNewPasscode.setDisabledTextColour(-1);
textboxNewPasscode.setEnableBackgroundDrawing(true);
textboxNewPasscode.setMaxStringLength(20);
textboxConfirmPasscode = new GuiTextField(1, fontRendererObj, width / 2 - 57, height / 2 - 7, 110, 12);
textboxConfirmPasscode.setTextColor(-1);
textboxConfirmPasscode.setDisabledTextColour(-1);
textboxConfirmPasscode.setEnableBackgroundDrawing(true);
textboxConfirmPasscode.setMaxStringLength(20);
}
示例3: initGui
import net.minecraft.client.gui.GuiTextField; //導入方法依賴的package包/類
@Override
public void initGui(){
super.initGui();
Keyboard.enableRepeatEvents(true);
buttonList.add(new GuiButton(0, width / 2 - 38, height / 2 + 30 + 10, 80, 20, "0"));
buttonList.add(new GuiButton(1, width / 2 - 38, height / 2 - 60 + 10, 20, 20, "1"));
buttonList.add(new GuiButton(2, width / 2 - 8, height / 2 - 60 + 10, 20, 20, "2"));
buttonList.add(new GuiButton(3, width / 2 + 22, height / 2 - 60 + 10, 20, 20, "3"));
buttonList.add(new GuiButton(4, width / 2 - 38, height / 2 - 30 + 10, 20, 20, "4"));
buttonList.add(new GuiButton(5, width / 2 - 8, height / 2 - 30 + 10, 20, 20, "5"));
buttonList.add(new GuiButton(6, width / 2 + 22, height / 2 - 30 + 10, 20, 20, "6"));
buttonList.add(new GuiButton(7, width / 2 - 38, height / 2 + 10, 20, 20, "7"));
buttonList.add(new GuiButton(8, width / 2 - 8, height / 2 + 10, 20, 20, "8"));
buttonList.add(new GuiButton(9, width / 2 + 22, height / 2 + 10, 20, 20, "9"));
buttonList.add(new GuiButton(10, width / 2 + 48, height / 2 + 30 + 10, 25, 20, "<-"));
keycodeTextbox = new GuiTextField(11, fontRendererObj, width / 2 - 37, height / 2 - 67, 77, 12);
keycodeTextbox.setTextColor(-1);
keycodeTextbox.setDisabledTextColour(-1);
keycodeTextbox.setEnableBackgroundDrawing(true);
keycodeTextbox.setMaxStringLength(11);
}
示例4: initGui
import net.minecraft.client.gui.GuiTextField; //導入方法依賴的package包/類
@Override
public void initGui(){
super.initGui();
Keyboard.enableRepeatEvents(true);
buttonList.add(confirmButton = new GuiButton(0, width / 2 - 52, height / 2 + 52, 100, 20, StatCollector.translateToLocal("gui.universalKeyChanger.confirm")));
confirmButton.enabled = false;
textboxNewPasscode = new GuiTextField(0, fontRendererObj, width / 2 - 57, height / 2 - 47, 110, 12);
textboxNewPasscode.setTextColor(-1);
textboxNewPasscode.setDisabledTextColour(-1);
textboxNewPasscode.setEnableBackgroundDrawing(true);
textboxNewPasscode.setMaxStringLength(20);
textboxConfirmPasscode = new GuiTextField(1, fontRendererObj, width / 2 - 57, height / 2 - 7, 110, 12);
textboxConfirmPasscode.setTextColor(-1);
textboxConfirmPasscode.setDisabledTextColour(-1);
textboxConfirmPasscode.setEnableBackgroundDrawing(true);
textboxConfirmPasscode.setMaxStringLength(20);
}
示例5: initGui
import net.minecraft.client.gui.GuiTextField; //導入方法依賴的package包/類
@Override
public void initGui(){
super.initGui();
Keyboard.enableRepeatEvents(true);
buttonList.add(confirmButton = new GuiButton(0, width / 2 - 52, height / 2 + 52, 100, 20, ClientUtils.localize("gui.universalKeyChanger.confirm")));
confirmButton.enabled = false;
textboxNewPasscode = new GuiTextField(0, fontRenderer, width / 2 - 57, height / 2 - 47, 110, 12);
textboxNewPasscode.setTextColor(-1);
textboxNewPasscode.setDisabledTextColour(-1);
textboxNewPasscode.setEnableBackgroundDrawing(true);
textboxNewPasscode.setMaxStringLength(20);
textboxConfirmPasscode = new GuiTextField(1, fontRenderer, width / 2 - 57, height / 2 - 7, 110, 12);
textboxConfirmPasscode.setTextColor(-1);
textboxConfirmPasscode.setDisabledTextColour(-1);
textboxConfirmPasscode.setEnableBackgroundDrawing(true);
textboxConfirmPasscode.setMaxStringLength(20);
}
示例6: initGui
import net.minecraft.client.gui.GuiTextField; //導入方法依賴的package包/類
@Override
public void initGui(){
super.initGui();
Keyboard.enableRepeatEvents(true);
buttonList.add(new GuiButton(0, width / 2 - 38, height / 2 + 30 + 10, 80, 20, "0"));
buttonList.add(new GuiButton(1, width / 2 - 38, height / 2 - 60 + 10, 20, 20, "1"));
buttonList.add(new GuiButton(2, width / 2 - 8, height / 2 - 60 + 10, 20, 20, "2"));
buttonList.add(new GuiButton(3, width / 2 + 22, height / 2 - 60 + 10, 20, 20, "3"));
buttonList.add(new GuiButton(4, width / 2 - 38, height / 2 - 30 + 10, 20, 20, "4"));
buttonList.add(new GuiButton(5, width / 2 - 8, height / 2 - 30 + 10, 20, 20, "5"));
buttonList.add(new GuiButton(6, width / 2 + 22, height / 2 - 30 + 10, 20, 20, "6"));
buttonList.add(new GuiButton(7, width / 2 - 38, height / 2 + 10, 20, 20, "7"));
buttonList.add(new GuiButton(8, width / 2 - 8, height / 2 + 10, 20, 20, "8"));
buttonList.add(new GuiButton(9, width / 2 + 22, height / 2 + 10, 20, 20, "9"));
buttonList.add(new GuiButton(10, width / 2 + 48, height / 2 + 30 + 10, 25, 20, "<-"));
keycodeTextbox = new GuiTextField(fontRendererObj, width / 2 - 37, height / 2 - 67, 77, 12);
keycodeTextbox.setTextColor(-1);
keycodeTextbox.setDisabledTextColour(-1);
keycodeTextbox.setEnableBackgroundDrawing(true);
keycodeTextbox.setMaxStringLength(11);
}
示例7: makeField
import net.minecraft.client.gui.GuiTextField; //導入方法依賴的package包/類
GuiTextField makeField(int x, int y, int width, GuiTextField orig, int text_length) {
String text = orig == null ? "" : orig.getText();
int cornerX = (this.width - this.xSize) / 2;
int cornerY = (this.height - this.ySize) / 2;
GuiTextField ret = new GuiTextField(1337, this.fontRendererObj, cornerX + x, cornerY + y, width, 12);
ret.setTextColor(-1);
ret.setDisabledTextColour(-1);
ret.setEnableBackgroundDrawing(true);
ret.setMaxStringLength(text_length);
ret.setText(text);
return ret;
}
示例8: initGui
import net.minecraft.client.gui.GuiTextField; //導入方法依賴的package包/類
@Override
public void initGui(){
super.initGui();
Keyboard.enableRepeatEvents(true);
buttonList.add(saveAndContinueButton = new GuiButton(0, width / 2 - 48, height / 2 + 30 + 10, 100, 20, !flag ? ClientUtils.localize("gui.keycardSetup.save") : ClientUtils.localize("gui.password.invalidCode")));
keycodeTextbox = new GuiTextField(1, fontRendererObj, width / 2 - 37, height / 2 - 47, 77, 12);
keycodeTextbox.setTextColor(-1);
keycodeTextbox.setDisabledTextColour(-1);
keycodeTextbox.setEnableBackgroundDrawing(true);
keycodeTextbox.setMaxStringLength(11);
updateButtonText();
}
示例9: initGui
import net.minecraft.client.gui.GuiTextField; //導入方法依賴的package包/類
@Override
public void initGui() {
super.initGui();
Keyboard.enableRepeatEvents(true);
buttonList.add(saveAndContinueButton = new GuiButton(0, width / 2 - 48, height / 2 + 30 + 10, 100, 20, !flag ? ClientUtils.localize("gui.keycardSetup.save") : ClientUtils.localize("gui.password.invalidCode")));
keycodeTextbox = new GuiTextField(1, fontRendererObj, width / 2 - 37, height / 2 - 47, 77, 12);
keycodeTextbox.setTextColor(-1);
keycodeTextbox.setDisabledTextColour(-1);
keycodeTextbox.setEnableBackgroundDrawing(true);
keycodeTextbox.setMaxStringLength(4);
updateButtonText();
}
示例10: initGui
import net.minecraft.client.gui.GuiTextField; //導入方法依賴的package包/類
@Override
public void initGui() {
super.initGui();
Keyboard.enableRepeatEvents(true);
buttonList.add(saveAndContinueButton = new GuiButton(0, width / 2 - 48, height / 2 + 30 + 10, 100, 20, !flag ? StatCollector.translateToLocal("gui.keycardSetup.save") : StatCollector.translateToLocal("gui.password.invalidCode")));
keycodeTextbox = new GuiTextField(fontRendererObj, width / 2 - 37, height / 2 - 47, 77, 12);
keycodeTextbox.setTextColor(-1);
keycodeTextbox.setDisabledTextColour(-1);
keycodeTextbox.setEnableBackgroundDrawing(true);
keycodeTextbox.setMaxStringLength(4);
updateButtonText();
}
示例11: initGui
import net.minecraft.client.gui.GuiTextField; //導入方法依賴的package包/類
@Override
public void initGui(){
super.initGui();
Keyboard.enableRepeatEvents(true);
buttonList.add(saveAndContinueButton = new GuiButton(0, width / 2 - 48, height / 2 + 30 + 10, 100, 20, !flag ? StatCollector.translateToLocal("gui.keycardSetup.save") : StatCollector.translateToLocal("gui.password.invalidCode")));
keycodeTextbox = new GuiTextField(1, fontRendererObj, width / 2 - 37, height / 2 - 47, 77, 12);
keycodeTextbox.setTextColor(-1);
keycodeTextbox.setDisabledTextColour(-1);
keycodeTextbox.setEnableBackgroundDrawing(true);
keycodeTextbox.setMaxStringLength(11);
updateButtonText();
}
示例12: initGui
import net.minecraft.client.gui.GuiTextField; //導入方法依賴的package包/類
@Override
public void initGui() {
super.initGui();
Keyboard.enableRepeatEvents(true);
buttonList.add(saveAndContinueButton = new GuiButton(0, width / 2 - 48, height / 2 + 30 + 10, 100, 20, !flag ? StatCollector.translateToLocal("gui.keycardSetup.save") : StatCollector.translateToLocal("gui.password.invalidCode")));
keycodeTextbox = new GuiTextField(1, fontRendererObj, width / 2 - 37, height / 2 - 47, 77, 12);
keycodeTextbox.setTextColor(-1);
keycodeTextbox.setDisabledTextColour(-1);
keycodeTextbox.setEnableBackgroundDrawing(true);
keycodeTextbox.setMaxStringLength(4);
updateButtonText();
}
示例13: initGui
import net.minecraft.client.gui.GuiTextField; //導入方法依賴的package包/類
@Override
public void initGui(){
super.initGui();
Keyboard.enableRepeatEvents(true);
buttonList.add(saveAndContinueButton = new GuiButton(0, width / 2 - 48, height / 2 + 30 + 10, 100, 20, !flag ? StatCollector.translateToLocal("gui.keycardSetup.save") : StatCollector.translateToLocal("gui.password.invalidCode")));
keycodeTextbox = new GuiTextField(fontRendererObj, width / 2 - 37, height / 2 - 47, 77, 12);
keycodeTextbox.setTextColor(-1);
keycodeTextbox.setDisabledTextColour(-1);
keycodeTextbox.setEnableBackgroundDrawing(true);
keycodeTextbox.setMaxStringLength(11);
updateButtonText();
}
示例14: setupTextField
import net.minecraft.client.gui.GuiTextField; //導入方法依賴的package包/類
private GuiTextField setupTextField(FontRenderer fontRenderer, Point screenSize, Point backgroundSize,
Point position, Point boxSize, String text) {
GuiTextField newTextField = new GuiTextField(fontRenderer, (screenSize.getX() - backgroundSize.getX()) / 2
+ position.getX(), (screenSize.getY() - backgroundSize.getY()) / 2 + position.getY(), boxSize.getX(),
boxSize.getY());
newTextField.setText(text);
newTextField.setTextColor(-1);
newTextField.setDisabledTextColour(-1);
newTextField.setEnableBackgroundDrawing(false);
newTextField.setMaxStringLength(3);
return newTextField;
}
示例15: initGui
import net.minecraft.client.gui.GuiTextField; //導入方法依賴的package包/類
@Override
public void initGui(){
super.initGui();
Keyboard.enableRepeatEvents(true);
buttonList.add(saveAndContinueButton = new GuiButton(0, width / 2 - 48, height / 2 + 30 + 10, 100, 20, !flag ? ClientUtils.localize("gui.keycardSetup.save") : ClientUtils.localize("gui.password.invalidCode")));
keycodeTextbox = new GuiTextField(1, fontRenderer, width / 2 - 37, height / 2 - 47, 77, 12);
keycodeTextbox.setTextColor(-1);
keycodeTextbox.setDisabledTextColour(-1);
keycodeTextbox.setEnableBackgroundDrawing(true);
keycodeTextbox.setMaxStringLength(11);
updateButtonText();
}