本文整理汇总了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);
}
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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");
}
示例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);
}
示例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);
}
示例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);
}
示例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();
}
示例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");
}
示例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();
}
示例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);
}
示例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);
}
示例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;
}