@Override public void initGui() { super.initGui(); this.name = new GuiTextField( 0, this.fontRenderer, this.guiLeft + 24, this.guiTop + 32, 79, this.fontRenderer.FONT_HEIGHT ); this.name.setEnableBackgroundDrawing( false ); this.name.setMaxStringLength( 32 ); this.name.setTextColor( 0xFFFFFF ); this.name.setVisible( true ); this.name.setFocused( true ); }
@Override public void onInitGui() { super.onInitGui(); if(!GuiLexicon.isValidLexiconGui(this)) { currentOpenLexicon = new GuiLexicon(); mc.displayGuiScreen(currentOpenLexicon); ClientTickHandler.notifyPageChange(); return; } buttonList.add(backButton = new GuiButtonBack(12, left + guiWidth / 2 - 8, top + guiHeight + 2)); buttonList.add(leftButton = new GuiButtonPage(13, left, top + guiHeight - 10, false)); buttonList.add(rightButton = new GuiButtonPage(14, left + guiWidth - 18, top + guiHeight - 10, true)); searchField = new GuiTextField(15, fontRenderer, left + guiWidth / 2 + 28, top + guiHeight + 6, 200, 10); searchField.setCanLoseFocus(false); searchField.setFocused(true); searchField.setEnableBackgroundDrawing(false); updateAll(); }
public GuiTradeName(TileTrader tile) { super(Constants.TEXTURE_PATH_GUI + "/tradername.png", new ContainerTradeName(tile)); this.tile = tile; this.xSize = 176; this.ySize = 90; addressNameField = new GuiTextField(0, this.fontRenderer, guiLeft + 44, guiTop + 39, 90, 14); }
@Override public void init(IComponentParent parent) { super.init(parent); textfield = new GuiTextField(0, parent.getFontRenderer(), x, y, width, height); }
@Override public void initGui() { super.initGui(); int xLocation = (this.width - this.xSize) / 2; int yLocation = (this.height - this.ySize) / 2; this.textBoxFilter = new GuiTextField(0, this.fontRenderer, xLocation + 88, yLocation + 8, 45, 10); this.textBoxFilter.setText(inv.filter); this.buttonList.add(new GuiButton(1, xLocation + 125, yLocation + 100, 14, 14, "<")); this.buttonList.add(new GuiButton(2, xLocation + 193, yLocation + 100, 14, 14, ">")); }
@Override public void initGui() { super.initGui(); this.buttonList.add(new GuiOptionButton(0, this.width / 2 - 155, this.height / 6 + 96, this.yes)); this.buttonList.add(new GuiOptionButton(1, this.width / 2 - 155 + 160, this.height / 6 + 96, this.no)); this.nameField = new GuiTextField(2, this.fontRenderer, this.width / 2 - 155 + 77, this.height / 6 + 70, 155, 12); this.nameField.setTextColor(-1); this.nameField.setDisabledTextColour(-1); this.nameField.setEnableBackgroundDrawing(true); this.nameField.setMaxStringLength(35); this.listLines.clear(); this.listLines.addAll(this.fontRenderer.listFormattedStringToWidth(this.text2, this.width - 50)); this.nameField.setText(sword_names[new Random().nextInt(sword_names.length)]); }
@Override public void initGui(){ super.initGui(); this.nameField = new GuiTextField(4000, this.fontRenderer, this.guiLeft+5, this.guiTop+6, 114, 8); this.nameField.setMaxStringLength(20); this.nameField.setEnableBackgroundDrawing(false); this.nameField.setFocused(true); }
public GuiLetter(EntityPlayer player, ItemInventoryLetter itemInventory) { super(Constants.TEXTURE_PATH_GUI + "/letter.png", new ContainerLetter(player, itemInventory)); this.itemInventory = itemInventory; this.xSize = 194; this.ySize = 227; this.isProcessedLetter = container.getLetter().isProcessed(); this.widgetManager.add(new AddresseeSlot(widgetManager, 16, 12, container)); this.tradeInfoWidgets = new ArrayList<>(); address = new GuiTextField(0, this.fontRenderer, guiLeft + 46, guiTop + 13, 93, 13); text = new GuiTextBox(1, this.fontRenderer, guiLeft + 17, guiTop + 31, 122, 57); }
@Override public void initGui() { super.initGui(); text = new BookTextRenderer(this, getDescriptionText(), LEFT_PAGE_X, TOP_PADDING + 22); visibleEntries = new ArrayList<>(); allEntries = new ArrayList<>(getEntries()); allEntries.removeIf(BookEntry::shouldHide); if(shouldSortEntryList()) Collections.sort(allEntries); searchField = new GuiTextField(0, fontRenderer, 160, 170, 90, 12); searchField.setMaxStringLength(32); searchField.setEnableBackgroundDrawing(false); searchField.setCanLoseFocus(false); searchField.setFocused(true); dependentButtons = new ArrayList<>(); buildEntryButtons(); }
this.cornerY += 4; textField = new GuiTextField(0, fontRenderer, cornerX + 70, cornerY + 7, 92, 12);
@Override public void initGui() { super.initGui(); addressNameField = new GuiTextField(0, this.fontRenderer, guiLeft + 44, guiTop + 39, 90, 14); addressNameField.setText(container.getAddress().getName()); addressNameField.setFocused(true); }
@Override public void initGui() { super.initGui(); text = new BookTextRenderer(this, I18n.format("patchouli.gui.lexicon.editor.info"), LEFT_PAGE_X, TOP_PADDING + 20); textfield = new GuiTextField(0, fontRenderer, 10, FULL_HEIGHT - 40, PAGE_WIDTH, 20); textfield.setMaxStringLength(Integer.MAX_VALUE); textfield.setText(savedText); buttonList.add(new GuiButtonBookResize(this, bookLeft + 115, bookTop + PAGE_HEIGHT - 36, false)); Keyboard.enableRepeatEvents(true); refreshText(); }
@Override public void initGui() { super.initGui(); this.searchField = new GuiTextField(0, this.fontRenderer, this.guiLeft + 101, this.guiTop + 6, 80, this.fontRenderer.FONT_HEIGHT); this.searchField.setMaxStringLength(50); this.searchField.setEnableBackgroundDrawing(false); this.searchField.setTextColor(16777215); addButton(new GuiDatabaseButton<>(0, guiLeft - 18, guiTop, DatabaseHelper.ascending, this, DatabaseButton.SORT_DIRECTION_BUTTON)); updateViewedItems(); }
public TextFieldComponent(IValueContainer.Entry entry) { super(entry.getId(), entry.getName()); textFieldLootTable = new GuiTextField(0, Minecraft.getMinecraft().fontRenderer, 0, 0, GuiEditValueContainer.WIDTH - GuiEditValueContainer.PADDING * 2, 20); textFieldLootTable.setMaxStringLength(256); if(entry.getValue() != null) { textFieldLootTable.setText(entry.getValue()); } }
@Override public void initGui() { super.initGui(); Keyboard.enableRepeatEvents(true); address = new GuiTextField(0, this.fontRenderer, guiLeft + 46, guiTop + 13, 93, 13); IMailAddress recipient = container.getRecipient(); if (recipient != null) { address.setText(recipient.getName()); } text = new GuiTextBox(1, this.fontRenderer, guiLeft + 17, guiTop + 31, 122, 57); text.setMaxStringLength(128); if (!container.getText().isEmpty()) { text.setText(container.getText()); } }
public TextFieldWidget(int xPosition, int yPosition, int width, int height, boolean enableBackground, Supplier<String> textSupplier, Consumer<String> textResponder) { super(); if(isClientSide()) { FontRenderer fontRenderer = Minecraft.getMinecraft().fontRenderer; this.textField = new GuiTextField(0, fontRenderer, xPosition, yPosition, width, height); this.textField.setCanLoseFocus(true); this.textField.setEnableBackgroundDrawing(enableBackground); this.textField.setMaxStringLength(maxStringLength); this.textField.setGuiResponder(MCGuiUtil.createTextFieldResponder(this::onTextChanged)); } this.textSupplier = textSupplier; this.textResponder = textResponder; }
@Override public void initGui() { super.initGui(); String oldString = searchField != null ? searchField.getText() : ""; this.searchField = new GuiTextField(0, this.fontRenderer, this.guiLeft + selection.getX() + 89 + 36, selection.getY() + this.guiTop + 4, 80, this.fontRenderer.FONT_HEIGHT); this.searchField.setMaxStringLength(50); this.searchField.setEnableBackgroundDrawing(false); this.searchField.setTextColor(16777215); this.searchField.setText(oldString); }
@Override public void init(int x, int y) { addSideButton(new SideButtonRedstoneMode(this, readerWriter.getRedstoneModeParameter())); add = addButton(x + 128, y + 15, 20, 20, "+"); remove = addButton(x + 150, y + 15, 20, 20, "-"); name = new GuiTextField(0, fontRenderer, x + 8 + 1, y + 20 + 1, 107, fontRenderer.FONT_HEIGHT); name.setEnableBackgroundDrawing(false); name.setVisible(true); name.setTextColor(16777215); name.setCanLoseFocus(true); name.setFocused(false); }
@Override public void initGui() { super.initGui(); Keyboard.enableRepeatEvents(true); int i = (width - xSize) / 2; int j = (height - ySize) / 2; textField = new GuiTextField(0, fontRenderer, i + 62, j + 24, 103, 12); textField.setTextColor(-1); textField.setDisabledTextColour(-1); textField.setEnableBackgroundDrawing(false); textField.setMaxStringLength(40); inventorySlots.removeListener(this); inventorySlots.addListener(this); textField.setText(hammer.itemName); canEdit = true; }
@Override public void init(int x, int y) { addSideButton(new SideButtonType(this, TileDetector.TYPE)); addSideButton(new SideButtonDetectorMode(this)); addSideButton(new SideButtonCompare(this, TileDetector.COMPARE, IComparer.COMPARE_DAMAGE)); addSideButton(new SideButtonCompare(this, TileDetector.COMPARE, IComparer.COMPARE_NBT)); amount = new GuiTextField(0, fontRenderer, x + 41 + 1, y + 23 + 1, 50, fontRenderer.FONT_HEIGHT); amount.setText(String.valueOf(TileDetector.AMOUNT.getValue())); amount.setEnableBackgroundDrawing(false); amount.setVisible(true); amount.setTextColor(16777215); amount.setCanLoseFocus(true); amount.setFocused(false); }