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


Java GuiTextField.setEnableBackgroundDrawing方法代碼示例

本文整理匯總了Java中net.minecraft.client.gui.GuiTextField.setEnableBackgroundDrawing方法的典型用法代碼示例。如果您正苦於以下問題:Java GuiTextField.setEnableBackgroundDrawing方法的具體用法?Java GuiTextField.setEnableBackgroundDrawing怎麽用?Java GuiTextField.setEnableBackgroundDrawing使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在net.minecraft.client.gui.GuiTextField的用法示例。


在下文中一共展示了GuiTextField.setEnableBackgroundDrawing方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: initGui

import net.minecraft.client.gui.GuiTextField; //導入方法依賴的package包/類
@Override
public void initGui() {
    super.initGui();
    this.guiLeft = (this.width - this.guiXSize) / 2;
    this.guiTop = (this.height - this.guiYSize) / 2;
    if (this.hasBackButton()) {
        back = new TextureButton(-135, this.guiLeft - 5, this.guiTop + 2, 18, 10, BOOK_EXTRAS, 1, 27, "Go back");
        this.buttonList.add(back);
    }
    if (this.hasPageLeft()) {
        left = new TextureButton(-136, this.guiLeft + 20, this.guiTop + guiYSize - 25, 18, 10, BOOK_EXTRAS, 1, 14, "Previous page");
        this.buttonList.add(left);
    }
    if (this.hasPageRight()) {
        right = new TextureButton(-137, this.guiLeft + guiXSize - 45, this.guiTop + guiYSize - 25, 18, 10, BOOK_EXTRAS, 1, 1, "Next page");
        this.buttonList.add(right);
    }
    if (hasSearchBar()) {
        search = new GuiTextField(-138, this.fontRenderer, this.guiLeft + 20, this.guiTop + 15, 128, 12);
        search.setMaxStringLength(50);
        search.setEnableBackgroundDrawing(true);
    }
}
 
開發者ID:Buuz135,項目名稱:Industrial-Foregoing,代碼行數:24,代碼來源:GUIBookBase.java

示例2: initGui

import net.minecraft.client.gui.GuiTextField; //導入方法依賴的package包/類
@Override
public void initGui() {
	super.initGui();
	infinite = tileEntity.infiniteMode;
	infiniteButton = new GuiSlimButton(idInfiniteButton, 9 + (width - xSize) / 2, 54 + (height - ySize) / 2, 148,
			12, infinite ? I18n.format("vendor.wrench.infiniteon") : I18n.format("vendor.wrench.infiniteoff"));
	editButton = new GuiSlimButton(idEditButton, 68 + (width - xSize) / 2, 34 + (height - ySize) / 2, 40, 12,
			I18n.format("general.button.edit"));
	applyButton = new GuiSlimButton(idApplyButton, 110 + (width - xSize) / 2, 34 + (height - ySize) / 2, 40, 12,
			I18n.format("general.button.save"));
	buttonList.clear();
	buttonList.add(editButton);
	buttonList.add(applyButton);
	buttonList.add(infiniteButton);

	blockOwnerField = new GuiTextField(0, this.fontRenderer, 12, 20, 138, 13);
	blockOwnerField.setFocused(false);
	blockOwnerField.setMaxStringLength(100);
	blockOwnerField.setText(tileEntity.blockOwner);
	blockOwnerField.setEnableBackgroundDrawing(true);
}
 
開發者ID:notabadminer,項目名稱:UniversalCoins,代碼行數:22,代碼來源:VendorWrenchGUI.java

示例3: 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

示例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, 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

示例5: 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

示例6: initGui

import net.minecraft.client.gui.GuiTextField; //導入方法依賴的package包/類
/**
 * Adds the buttons (and other controls) to the screen in question.
 */
@Override
public void initGui() {
    this.buttonList.clear();
    Keyboard.enableRepeatEvents(true);
    int left = (width - xSize) / 2;
    int top = (height - ySize) / 2;

    buttonList.add(searchButton = new GuiButton(0, left + 179, top + 14, 43, 20, StringUtils.translate("gui.search")));

    queryField = new GuiTextField(fontRendererObj, left + 38, top + 19, 150, fontRendererObj.FONT_HEIGHT + 5);
    queryField.setVisible(true);
    queryField.setMaxStringLength(100);
    queryField.setEnableBackgroundDrawing(true);
    queryField.setCanLoseFocus(true);
    queryField.setFocused(false);
    queryField.setEnableBackgroundDrawing(false);

    scrollbar = new GuiScrollbar(mc, left + 217, top + 44, 114, 0, ySize + 1, 8, 15, "playblock:textures/gui/search_bg.png");
}
 
開發者ID:sk89q,項目名稱:playblock,代碼行數:23,代碼來源:GuiSearch.java

示例7: 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

示例8: 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

示例9: 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

示例10: initGui

import net.minecraft.client.gui.GuiTextField; //導入方法依賴的package包/類
/**
 * Adds the buttons (and other controls) to the screen in question.
 */
@Override
public void initGui() {
    super.initGui();
    buttonList.clear();
    Keyboard.enableRepeatEvents(true);
    searchField = new GuiTextField(-1, fontRenderer, guiLeft + 20, guiTop + 36, 89, fontRenderer.FONT_HEIGHT);
    searchField.setMaxStringLength(15);
    searchField.setEnableBackgroundDrawing(true);
    searchField.setVisible(true);
    searchField.setFocused(true);
    searchField.setTextColor(16777215);

    updateCreativeSearch();
}
 
開發者ID:TeamPneumatic,項目名稱:pnc-repressurized,代碼行數:18,代碼來源:GuiSearcher.java

示例11: NavigatorMainScreen

import net.minecraft.client.gui.GuiTextField; //導入方法依賴的package包/類
public NavigatorMainScreen()
{
	hasBackground = false;
	nonScrollableArea = 0;
	
	searchBar = new GuiTextField(0, Fonts.segoe22, 0, 32, 200, 20);
	searchBar.setEnableBackgroundDrawing(false);
	searchBar.setMaxStringLength(128);
	searchBar.setFocused(true);
	
	Navigator navigator = WurstClient.INSTANCE.navigator;
	navigator.copyNavigatorList(navigatorDisplayList);
	navigator.analytics.trackPageView("/", "Navigator");
}
 
開發者ID:Wurst-Imperium,項目名稱:Wurst-MC-1.12,代碼行數:15,代碼來源:NavigatorMainScreen.java

示例12: initGui

import net.minecraft.client.gui.GuiTextField; //導入方法依賴的package包/類
@Override
public void initGui(){
	super.initGui();
	int sx = (width - xSize) / 2;
	int sy = (height - ySize) / 2;
	
	Keyboard.enableRepeatEvents(true);
       searchBar = new GuiTextField(0, this.fontRendererObj, sx + getSearchBarX(), sy + getSearchBarY(), getSearchBarWidth(), 16);
       searchBar.setEnableBackgroundDrawing(false);
       searchBar.setText(panel.getSearchBar() == null ? "" : panel.getSearchBar());
       
       scrollbar = new VScrollbar(this, getScrollBarX(), getScrollBarY(), getScrollBarHeight());
     	scrollbar.adjustPosition();
	refreshButtons();
}
 
開發者ID:Alec-WAM,項目名稱:CrystalMod,代碼行數:16,代碼來源:GuiPanel.java

示例13: CraftingAmountPopup

import net.minecraft.client.gui.GuiTextField; //導入方法依賴的package包/類
public CraftingAmountPopup(GuiPanel guiPanel, ItemStackData data){
	this.currentCraft = data;
	
	craftingRequestAmount = new GuiTextField(1, Minecraft.getMinecraft().fontRendererObj, guiPanel.getCraftBoxX()+7, guiPanel.getCraftBoxY()+28, 78, 10);
       craftingRequestAmount.setEnableBackgroundDrawing(false);
       craftingRequestAmount.setText("1");
       
       this.craftingRequestAmount.setEnabled(true);
	this.craftingRequestAmount.setFocused(true);
}
 
開發者ID:Alec-WAM,項目名稱:CrystalMod,代碼行數:11,代碼來源:CraftingAmountPopup.java

示例14: initGui

import net.minecraft.client.gui.GuiTextField; //導入方法依賴的package包/類
@Override
public void initGui() {
	labelList.clear();
	super.initGui();
	this.guiLeft = (this.width - xSize) / 2;
	this.guiTop = (this.height - ySize) / 2;
	buttonNext = new GuiButtonNext(0, guiLeft + 130, guiTop + 51, 30, 20, I18n.format("tomsmod.gui.next"), I18n.format("tomsmod.gui.start"));
	buttonList.add(buttonNext);
	up1 = new GuiButtonNum(1, guiLeft + 20, guiTop + 26, 1, 1, 20);
	up10 = new GuiButtonNum(1, guiLeft + 45, guiTop + 26, 10, 16, 25);
	up100 = new GuiButtonNum(1, guiLeft + 75, guiTop + 26, 100, 32, 30);
	up1000 = new GuiButtonNum(1, guiLeft + 110, guiTop + 26, 1000, 64, 35);
	down1 = new GuiButtonNum(1, guiLeft + 20, guiTop + 76, -1, -1, 20);
	down10 = new GuiButtonNum(1, guiLeft + 45, guiTop + 76, -10, -16, 25);
	down100 = new GuiButtonNum(1, guiLeft + 75, guiTop + 76, -100, -32, 30);
	down1000 = new GuiButtonNum(1, guiLeft + 110, guiTop + 76, -1000, -64, 35);
	buttonList.add(down1);
	buttonList.add(down10);
	buttonList.add(down100);
	buttonList.add(down1000);
	buttonList.add(up1);
	buttonList.add(up10);
	buttonList.add(up100);
	buttonList.add(up1000);
	numberField = new GuiTextField(1, mc.fontRenderer, guiLeft + 61, guiTop + 57, 59, 10);
	numberField.setTextColor(0xFFFFFF);
	numberField.setEnableBackgroundDrawing(false);
	numberField.setText("1");
	numberField.setCanLoseFocus(false);
	numberField.setFocused(true);
	numberField.setMaxStringLength(6);
	TomsModUtils.addTextFieldToLabelList(numberField, labelList);
	buttonBack = new GuiButtonHidden(2, guiLeft + 155, guiTop + 2, 18, 18);
	buttonList.add(buttonBack);
}
 
開發者ID:tom5454,項目名稱:Toms-Mod,代碼行數:36,代碼來源:GuiCraftingAmountSelection.java

示例15: 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


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