Search in sources :

Example 6 with WidgetTextField

use of pneumaticCraft.client.gui.widget.WidgetTextField in project PneumaticCraft by MineMaarten.

the class GuiAmadron method initGui.

@Override
public void initGui() {
    super.initGui();
    String amadron = I18n.format("gui.amadron");
    addLabel(amadron, guiLeft + xSize / 2 - mc.fontRenderer.getStringWidth(amadron) / 2, guiTop + 5);
    addLabel(I18n.format("gui.search"), guiLeft + 76 - mc.fontRenderer.getStringWidth(I18n.format("gui.search")), guiTop + 41);
    addInfoTab(I18n.format("gui.tooltip.item.amadronTablet"));
    addAnimatedStat("gui.tab.info.ghostSlotInteraction.title", new ItemStack(Blocks.hopper), 0xFF00AAFF, true).setText("gui.tab.info.ghostSlotInteraction");
    addAnimatedStat("gui.tab.amadron.disclaimer.title", new ItemStack(Items.writable_book), 0xFF0000FF, true).setText("gui.tab.amadron.disclaimer");
    searchBar = new WidgetTextField(mc.fontRenderer, guiLeft + 79, guiTop + 40, 73, mc.fontRenderer.FONT_HEIGHT);
    addWidget(searchBar);
    scrollbar = new WidgetVerticalScrollbar(-1, guiLeft + 156, guiTop + 54, 142);
    scrollbar.setStates(1);
    scrollbar.setListening(true);
    addWidget(scrollbar);
    List<String> tooltip = PneumaticCraftUtils.convertStringIntoList(I18n.format("gui.amadron.button.order.tooltip"), 40);
    addWidget(new GuiButtonSpecial(1, guiLeft + 6, guiTop + 15, 72, 20, I18n.format("gui.amadron.button.order")).setTooltipText(tooltip));
    addTradeButton = new GuiButtonSpecial(2, guiLeft + 80, guiTop + 15, 72, 20, I18n.format("gui.amadron.button.addTrade"));
    addWidget(addTradeButton);
    updateVisibleOffers();
}
Also used : ItemStack(net.minecraft.item.ItemStack) WidgetTextField(pneumaticCraft.client.gui.widget.WidgetTextField) WidgetVerticalScrollbar(pneumaticCraft.client.gui.widget.WidgetVerticalScrollbar)

Example 7 with WidgetTextField

use of pneumaticCraft.client.gui.widget.WidgetTextField in project PneumaticCraft by MineMaarten.

the class GuiProgWidgetLiquidFilter method initGui.

@Override
public void initGui() {
    super.initGui();
    mainFilter = new WidgetFluidFilter(-1, guiLeft + 124, guiTop + 25).setFluid(widget.getFluid());
    addWidget(mainFilter);
    for (int x = 0; x < GRID_WIDTH; x++) {
        for (int y = 0; y < GRID_HEIGHT; y++) {
            addWidget(new WidgetFluidFilter(x + y * GRID_WIDTH, guiLeft + 8 + x * 18, guiTop + 52 + y * 18));
        }
    }
    searchField = new WidgetTextField(Minecraft.getMinecraft().fontRenderer, guiLeft + 10, guiTop + 30, 90, 10);
    addWidget(searchField);
    scrollbar = new WidgetVerticalScrollbar(guiLeft + 155, guiTop + 47, 112);
    scrollbar.setListening(true);
    addWidget(scrollbar);
    addValidFluids();
}
Also used : WidgetFluidFilter(pneumaticCraft.client.gui.widget.WidgetFluidFilter) WidgetTextField(pneumaticCraft.client.gui.widget.WidgetTextField) WidgetVerticalScrollbar(pneumaticCraft.client.gui.widget.WidgetVerticalScrollbar)

Example 8 with WidgetTextField

use of pneumaticCraft.client.gui.widget.WidgetTextField in project PneumaticCraft by MineMaarten.

the class GuiProgWidgetString method initGui.

@Override
public void initGui() {
    super.initGui();
    textfield = new WidgetTextField(fontRendererObj, guiLeft + 10, guiTop + 20, 160, 10);
    textfield.setMaxStringLength(1000);
    textfield.setText(((ProgWidgetString) widget).string);
    addWidget(textfield);
}
Also used : WidgetTextField(pneumaticCraft.client.gui.widget.WidgetTextField)

Example 9 with WidgetTextField

use of pneumaticCraft.client.gui.widget.WidgetTextField in project PneumaticCraft by MineMaarten.

the class GuiRemoteDropdown method initGui.

@Override
public void initGui() {
    super.initGui();
    addLabel(I18n.format("gui.remote.button.width"), guiLeft + 10, guiTop + 100);
    addLabel(I18n.format("gui.remote.dropdown.dropDownElements"), guiLeft + 10, guiTop + 40);
    dropDownElementsField = new WidgetTextField(fontRendererObj, guiLeft + 10, guiTop + 50, 160, 10);
    dropDownElementsField.setText(widget.getDropDownElements());
    dropDownElementsField.setTooltip(I18n.format("gui.remote.dropdown.dropDownElements.tooltip"));
    addWidget(dropDownElementsField);
    widthField = new WidgetTextFieldNumber(fontRendererObj, guiLeft + 50, guiTop + 99, 30, 10);
    widthField.setValue(widget.getWidth());
    widthField.minValue = 10;
    addWidget(widthField);
}
Also used : WidgetTextFieldNumber(pneumaticCraft.client.gui.widget.WidgetTextFieldNumber) WidgetTextField(pneumaticCraft.client.gui.widget.WidgetTextField)

Example 10 with WidgetTextField

use of pneumaticCraft.client.gui.widget.WidgetTextField in project PneumaticCraft by MineMaarten.

the class GuiRemoteOptionBase method initGui.

@Override
public void initGui() {
    super.initGui();
    String title = I18n.format("remote." + widget.getId() + ".name");
    addLabel(I18n.format("gui.remote.enable"), guiLeft + 10, guiTop + 150);
    addLabel(title, width / 2 - fontRendererObj.getStringWidth(title) / 2, guiTop + 5);
    addLabel("#", guiLeft + 10, guiTop + 161);
    if (widget instanceof IActionWidgetLabeled) {
        addLabel(I18n.format("gui.remote.text"), guiLeft + 10, guiTop + 20);
        addLabel(I18n.format("gui.remote.tooltip"), guiLeft + 10, guiTop + 46);
    }
    addLabel(I18n.format("gui.remote.enableValue"), guiLeft + 10, guiTop + 175);
    addLabel("X:", guiLeft + 10, guiTop + 186);
    addLabel("Y:", guiLeft + 67, guiTop + 186);
    addLabel("Z:", guiLeft + 124, guiTop + 186);
    enableField = new WidgetComboBox(fontRendererObj, guiLeft + 18, guiTop + 160, 152, 10);
    enableField.setElements(((ContainerRemote) guiRemote.inventorySlots).variables);
    enableField.setText(widget.getEnableVariable());
    enableField.setTooltip(I18n.format("gui.remote.enable.tooltip"));
    addWidget(enableField);
    String valueTooltip = I18n.format("gui.remote.enableValue.tooltip");
    xValueField = new WidgetTextFieldNumber(fontRendererObj, guiLeft + 20, guiTop + 185, 38, 10);
    xValueField.setValue(widget.getEnablingValue().chunkPosX);
    xValueField.setTooltip(valueTooltip);
    addWidget(xValueField);
    yValueField = new WidgetTextFieldNumber(fontRendererObj, guiLeft + 78, guiTop + 185, 38, 10);
    yValueField.setValue(widget.getEnablingValue().chunkPosY);
    yValueField.setTooltip(valueTooltip);
    addWidget(yValueField);
    zValueField = new WidgetTextFieldNumber(fontRendererObj, guiLeft + 136, guiTop + 185, 38, 10);
    zValueField.setValue(widget.getEnablingValue().chunkPosZ);
    zValueField.setTooltip(valueTooltip);
    addWidget(zValueField);
    if (widget instanceof IActionWidgetLabeled) {
        labelField = new WidgetTextField(fontRendererObj, guiLeft + 10, guiTop + 30, 160, 10);
        labelField.setText(((IActionWidgetLabeled) widget).getText());
        labelField.setTooltip(I18n.format("gui.remote.label.tooltip"));
        labelField.setMaxStringLength(1000);
        addWidget(labelField);
        tooltipField = new WidgetTextField(fontRendererObj, guiLeft + 10, guiTop + 56, 160, 10);
        tooltipField.setText(((IActionWidgetLabeled) widget).getTooltip());
        addWidget(tooltipField);
    }
}
Also used : IActionWidgetLabeled(pneumaticCraft.common.remote.IActionWidgetLabeled) WidgetTextFieldNumber(pneumaticCraft.client.gui.widget.WidgetTextFieldNumber) WidgetComboBox(pneumaticCraft.client.gui.widget.WidgetComboBox) WidgetTextField(pneumaticCraft.client.gui.widget.WidgetTextField)

Aggregations

WidgetTextField (pneumaticCraft.client.gui.widget.WidgetTextField)10 WidgetTextFieldNumber (pneumaticCraft.client.gui.widget.WidgetTextFieldNumber)3 GuiButton (net.minecraft.client.gui.GuiButton)2 GuiCheckBox (pneumaticCraft.client.gui.widget.GuiCheckBox)2 GuiRadioButton (pneumaticCraft.client.gui.widget.GuiRadioButton)2 WidgetVerticalScrollbar (pneumaticCraft.client.gui.widget.WidgetVerticalScrollbar)2 Point (java.awt.Point)1 ItemStack (net.minecraft.item.ItemStack)1 WidgetComboBox (pneumaticCraft.client.gui.widget.WidgetComboBox)1 WidgetFluidFilter (pneumaticCraft.client.gui.widget.WidgetFluidFilter)1 PacketGuiButton (pneumaticCraft.common.network.PacketGuiButton)1 PacketProgrammerUpdate (pneumaticCraft.common.network.PacketProgrammerUpdate)1 ICondition (pneumaticCraft.common.progwidgets.ICondition)1 ISidedWidget (pneumaticCraft.common.progwidgets.ISidedWidget)1 IActionWidgetLabeled (pneumaticCraft.common.remote.IActionWidgetLabeled)1