use of mcjty.lib.gui.widgets.TextField in project RFToolsDimensions by McJty.
the class GuiEssencePainter method initGui.
@Override
public void initGui() {
super.initGui();
extractButton = new Button(mc, this).setText("Extract").setLayoutHint(new PositionalLayout.PositionalHint(13, 164, 60, 16)).addButtonEvent(parent -> {
extractDimlets();
}).setTooltips("Extract the dimlets out of", "a realized dimension tab");
storeButton = new Button(mc, this).setText("Store").setLayoutHint(new PositionalLayout.PositionalHint(13, 182, 60, 16)).addButtonEvent(parent -> {
storeDimlets();
}).setTooltips("Store dimlets in a", "empty dimension tab");
nameField = new TextField(mc, this).addTextEvent((parent, newText) -> {
storeName(newText);
}).setLayoutHint(new PositionalLayout.PositionalHint(13, 200, 60, 16));
validateField = new Label(mc, this).setText("Val");
validateField.setTooltips("Hover here for errors...");
validateField.setLayoutHint(new PositionalLayout.PositionalHint(35, 142, 38, 16));
setNameFromDimensionTab();
Panel toplevel = new Panel(mc, this).setBackground(iconLocation).setLayout(new PositionalLayout()).addChild(extractButton).addChild(storeButton).addChild(nameField).addChild(validateField);
toplevel.setBounds(new Rectangle(guiLeft, guiTop, xSize, ySize));
window = new Window(this, toplevel);
}
use of mcjty.lib.gui.widgets.TextField in project RFToolsDimensions by McJty.
the class GuiDimletWorkbench method initGui.
@Override
public void initGui() {
super.initGui();
searchBar = new TextField(mc, this).setLayoutHint(new PositionalLayout.PositionalHint(120, 7, 128, 16)).addTextEvent((widget, string) -> {
itemList.setSelected(-1);
listDirty = true;
});
itemList = new WidgetList(mc, this).setLayoutHint(new PositionalLayout.PositionalHint(120, 25, 118, 133)).setLeftMargin(0).setRowheight(-1).addSelectionEvent(new SelectionEvent() {
@Override
public void select(Widget widget, int i) {
}
@Override
public void doubleClick(Widget widget, int i) {
EntityPlayerSP player = Minecraft.getMinecraft().player;
if (player.isCreative() && (Keyboard.isKeyDown(Keyboard.KEY_LSHIFT) || Keyboard.isKeyDown(Keyboard.KEY_RSHIFT))) {
cheatDimlet();
} else {
suggestParts();
}
}
});
slider = new Slider(mc, this).setLayoutHint(new PositionalLayout.PositionalHint(239, 25, 9, 133)).setDesiredWidth(11).setVertical().setScrollable(itemList);
int maxEnergyStored = tileEntity.getMaxEnergyStored();
energyBar = new EnergyBar(mc, this).setVertical().setMaxValue(maxEnergyStored).setLayoutHint(new PositionalLayout.PositionalHint(88, 9, 30, 10)).setShowText(false).setHorizontal();
energyBar.setValue(GenericEnergyStorageTileEntity.getCurrentRF());
extractButton = new ToggleButton(mc, this).setText("Extract").setLayoutHint(new PositionalLayout.PositionalHint(30, 7, 56, 14)).setCheckMarker(true).addButtonEvent(parent -> setExtractMode()).setTooltips("If on dimlets will be reconstructed into parts");
extractButton.setPressed(tileEntity.isExtractMode());
Panel toplevel = new Panel(mc, this).setBackground(iconLocation).setLayout(new PositionalLayout()).addChild(extractButton).addChild(energyBar).addChild(itemList).addChild(slider).addChild(searchBar);
toplevel.setBounds(new Rectangle(guiLeft, guiTop, xSize, ySize));
listDirty = true;
window = new Window(this, toplevel);
}
use of mcjty.lib.gui.widgets.TextField in project RFToolsDimensions by McJty.
the class GuiDimensionEnscriber method initGui.
@Override
public void initGui() {
super.initGui();
extractButton = new Button(mc, this).setText("Extract").setLayoutHint(new PositionalLayout.PositionalHint(13, 164, 60, 16)).addButtonEvent(parent -> {
extractDimlets();
}).setTooltips("Extract the dimlets out of", "a realized dimension tab");
storeButton = new Button(mc, this).setText("Store").setLayoutHint(new PositionalLayout.PositionalHint(13, 182, 60, 16)).addButtonEvent(parent -> {
storeDimlets();
}).setTooltips("Store dimlets in a", "empty dimension tab");
nameField = new TextField(mc, this).addTextEvent((parent, newText) -> {
storeName(newText);
}).setLayoutHint(new PositionalLayout.PositionalHint(13, 200, 60, 16));
validateField = new Label(mc, this).setText("Val");
validateField.setTooltips("Hover here for errors...");
validateField.setLayoutHint(new PositionalLayout.PositionalHint(35, 142, 38, 16));
setNameFromDimensionTab();
Panel toplevel = new Panel(mc, this).setBackground(iconLocation).setLayout(new PositionalLayout()).addChild(extractButton).addChild(storeButton).addChild(nameField).addChild(validateField);
toplevel.setBounds(new Rectangle(guiLeft, guiTop, xSize, ySize));
window = new Window(this, toplevel);
}
Aggregations