當前位置: 首頁>>代碼示例>>Java>>正文


Java GuiTextField.setDisabledTextColour方法代碼示例

本文整理匯總了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);
}
 
開發者ID:Microsoft,項目名稱:vsminecraft,代碼行數:18,代碼來源:GuiRobitRepair.java

示例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);

}
 
開發者ID:Geforce132,項目名稱:SecurityCraft,代碼行數:23,代碼來源:GuiKeyChanger.java

示例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);
}
 
開發者ID:Geforce132,項目名稱:SecurityCraft,代碼行數:25,代碼來源:GuiCheckPassword.java

示例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);

}
 
開發者ID:Geforce132,項目名稱:SecurityCraft,代碼行數:23,代碼來源:GuiKeyChanger.java

示例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);

}
 
開發者ID:Geforce132,項目名稱:SecurityCraft,代碼行數:23,代碼來源:GuiKeyChanger.java

示例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);
}
 
開發者ID:Geforce132,項目名稱:SecurityCraft,代碼行數:25,代碼來源:GuiCheckPassword.java

示例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;
}
 
開發者ID:purpleposeidon,項目名稱:Factorization,代碼行數:13,代碼來源:GuiArtifactForge.java

示例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();
}
 
開發者ID:Geforce132,項目名稱:SecurityCraft,代碼行數:16,代碼來源:GuiSetPassword.java

示例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();
}
 
開發者ID:Geforce132,項目名稱:SecurityCraft,代碼行數:16,代碼來源:GuiBriefcaseSetup.java

示例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();
}
 
開發者ID:Geforce132,項目名稱:SecurityCraft,代碼行數:16,代碼來源:GuiBriefcaseSetup.java

示例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();
}
 
開發者ID:Geforce132,項目名稱:SecurityCraft,代碼行數:16,代碼來源:GuiSetPassword.java

示例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();
}
 
開發者ID:Geforce132,項目名稱:SecurityCraft,代碼行數:16,代碼來源:GuiBriefcaseSetup.java

示例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();
}
 
開發者ID:Geforce132,項目名稱:SecurityCraft,代碼行數:16,代碼來源:GuiSetPassword.java

示例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;
}
 
開發者ID:soultek101,項目名稱:projectzulu1.7.10,代碼行數:13,代碼來源:SpawnerFields.java

示例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();
}
 
開發者ID:Geforce132,項目名稱:SecurityCraft,代碼行數:16,代碼來源:GuiSetPassword.java


注:本文中的net.minecraft.client.gui.GuiTextField.setDisabledTextColour方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。