Java Code Examples for net.minecraft.client.gui.GuiTextField#setTextColor()
The following examples show how to use
net.minecraft.client.gui.GuiTextField#setTextColor() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: GuiHelm.java From archimedes-ships with MIT License | 5 votes |
@SuppressWarnings("unchecked") @Override public void initGui() { super.initGui(); Keyboard.enableRepeatEvents(true); int btnx = guiLeft - 100; int btny = guiTop + 20; buttonList.clear(); btnRename = new GuiButton(4, btnx, btny, 100, 20, StatCollector.translateToLocal("gui.shipstatus.rename")); buttonList.add(btnRename); btnAssemble = new GuiButton(1, btnx, btny += 20, 100, 20, StatCollector.translateToLocal("gui.shipstatus.compile")); buttonList.add(btnAssemble); btnUndo = new GuiButton(2, btnx, btny += 20, 100, 20, StatCollector.translateToLocal("gui.shipstatus.undo")); btnUndo.enabled = tileEntity.getPrevAssembleResult() != null && tileEntity.getPrevAssembleResult().getCode() != AssembleResult.RESULT_NONE; buttonList.add(btnUndo); btnMount = new GuiButton(3, btnx, btny += 20, 100, 20, StatCollector.translateToLocal("gui.shipstatus.mount")); btnMount.enabled = tileEntity.getAssembleResult() != null && tileEntity.getAssembleResult().getCode() == AssembleResult.RESULT_OK; buttonList.add(btnMount); txtShipName = new GuiTextField(fontRendererObj, guiLeft + 8 + xSize / 2, guiTop + 21, 120, 10); txtShipName.setMaxStringLength(127); txtShipName.setEnableBackgroundDrawing(false); txtShipName.setVisible(true); txtShipName.setCanLoseFocus(false); txtShipName.setTextColor(0xFFFFFF); txtShipName.setText(tileEntity.getShipInfo().shipName); }
Example 2
Source File: GuiSearcher.java From PneumaticCraft with GNU General Public License v3.0 | 5 votes |
/** * 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(fontRendererObj, guiLeft + 20, guiTop + 36, 89, fontRendererObj.FONT_HEIGHT); searchField.setMaxStringLength(15); searchField.setEnableBackgroundDrawing(true); searchField.setVisible(true); searchField.setFocused(true); searchField.setTextColor(16777215); updateCreativeSearch(); }