Search in sources :

Example 1 with WidgetVerticalScrollbar

use of me.desht.pneumaticcraft.client.gui.widget.WidgetVerticalScrollbar in project pnc-repressurized by TeamPneumatic.

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);
    searchField.setFocused(true);
    scrollbar = new WidgetVerticalScrollbar(guiLeft + 155, guiTop + 47, 112);
    scrollbar.setListening(true);
    addWidget(scrollbar);
    addValidFluids();
}
Also used : WidgetFluidFilter(me.desht.pneumaticcraft.client.gui.widget.WidgetFluidFilter) WidgetTextField(me.desht.pneumaticcraft.client.gui.widget.WidgetTextField) WidgetVerticalScrollbar(me.desht.pneumaticcraft.client.gui.widget.WidgetVerticalScrollbar)

Example 2 with WidgetVerticalScrollbar

use of me.desht.pneumaticcraft.client.gui.widget.WidgetVerticalScrollbar in project pnc-repressurized by TeamPneumatic.

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.amadron_tablet"));
    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);
    needsRefreshing = true;
}
Also used : ItemStack(net.minecraft.item.ItemStack) WidgetTextField(me.desht.pneumaticcraft.client.gui.widget.WidgetTextField) WidgetVerticalScrollbar(me.desht.pneumaticcraft.client.gui.widget.WidgetVerticalScrollbar)

Aggregations

WidgetTextField (me.desht.pneumaticcraft.client.gui.widget.WidgetTextField)2 WidgetVerticalScrollbar (me.desht.pneumaticcraft.client.gui.widget.WidgetVerticalScrollbar)2 WidgetFluidFilter (me.desht.pneumaticcraft.client.gui.widget.WidgetFluidFilter)1 ItemStack (net.minecraft.item.ItemStack)1