@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 ); }
public TextFieldWidget setTextColor(int textColor) { if(isClientSide()) { this.textField.setTextColor(textColor); } return this; }
@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)]); }
searchBar.setTextColor(0xFF5555); else searchBar.setTextColor(0xFFFFFF); searchBar.drawTextBox();
amountField.setVisible(true); amountField.setText(String.valueOf(getDefaultAmount())); amountField.setTextColor(16777215); amountField.setCanLoseFocus(false); amountField.setFocused(true);
@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(); }
@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 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); }
@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) { compareNbt = addCheckBox(x + 7, y + 77, t("gui.refinedstorage:filter.compare_nbt"), (compare & IComparer.COMPARE_NBT) == IComparer.COMPARE_NBT); compareDamage = addCheckBox(x + 7 + compareNbt.getButtonWidth() + 4, y + 77, t("gui.refinedstorage:filter.compare_damage"), (compare & IComparer.COMPARE_DAMAGE) == IComparer.COMPARE_DAMAGE); compareDamage.visible = type == IType.ITEMS; toggleModFilter = addCheckBox(0, y + 71 + 25, t("gui.refinedstorage:filter.mod_filter"), modFilter); toggleMode = addButton(x + 7, y + 71 + 21, 0, 20, ""); updateModeButton(mode); nameField = new GuiTextField(0, fontRenderer, x + 34, y + 121, 137 - 6, fontRenderer.FONT_HEIGHT); nameField.setText(name); nameField.setEnableBackgroundDrawing(false); nameField.setVisible(true); nameField.setCanLoseFocus(true); nameField.setFocused(false); nameField.setTextColor(16777215); addSideButton(new SideButtonFilterType(this)); }
@Override public void initGui() { super.initGui(); this.searchField = new GuiTextField(0, this.fontRenderer, this.getGuiLeft() + 98, this.getGuiTop() + 6, 70, 10); this.searchField.setEnableBackgroundDrawing(false); this.searchField.setVisible(true); this.searchField.setMaxStringLength(25); this.searchField.setTextColor(0xFFFFFF); IConfigManager cm = ((IConfigurableObject) this.inventorySlots).getConfigManager(); // FIXME: Don't use AE Core classes this.sortByButton = new GuiImgButton(this.getGuiLeft() - 18, this.getGuiTop() + 8, Settings.SORT_BY, cm.getSetting(Settings.SORT_BY)); this.viewItemsButton = new GuiImgButton(this.getGuiLeft() - 18, this.getGuiTop() + 48, Settings.VIEW_MODE, cm.getSetting(Settings.VIEW_MODE)); this.sortDirButton = new GuiImgButton(this.getGuiLeft() - 18, this.getGuiTop() + 28, Settings.SORT_DIRECTION, cm.getSetting(Settings.SORT_DIRECTION)); this.clearButton = new GuiImgButton(this.getGuiLeft() + 87, this.getGuiTop() + 142, Settings.ACTIONS, ActionItems.STASH); this.clearButton.setHalfSize(true); this.addButton(this.sortByButton); this.addButton(this.viewItemsButton); this.addButton(this.sortDirButton); this.addButton(this.clearButton); }