use of gregtech.api.gui.widgets.WidgetGroup in project GregTech by GregTechCE.
the class ItemListGridWidget method addSlotRows.
private void addSlotRows(int amount) {
for (int i = 0; i < amount; i++) {
int widgetAmount = widgets.size();
WidgetGroup widgetGroup = new WidgetGroup();
for (int j = 0; j < slotAmountX; j++) {
Widget widget = new ItemListSlotWidget(j * 18, 0, this, widgetAmount * 9 + j);
widgetGroup.addWidget(widget);
}
addWidget(widgetGroup);
}
}
use of gregtech.api.gui.widgets.WidgetGroup in project GregTech by GregTechCE.
the class CoverFluidFilter method createUI.
public ModularUI createUI(EntityPlayer player) {
WidgetGroup fluidFilterGroup = new WidgetGroup();
fluidFilterGroup.addWidget(new LabelWidget(10, 5, "cover.fluid_filter.title"));
fluidFilterGroup.addWidget(new CycleButtonWidget(10, 20, 110, 20, GTUtility.mapToString(FluidFilterMode.values(), (it) -> it.localeName), () -> this.filterMode.ordinal(), (newMode) -> this.setFilterMode(FluidFilterMode.values()[newMode])));
this.fluidFilter.initUI(45, fluidFilterGroup::addWidget);
return ModularUI.builder(GuiTextures.BACKGROUND, 176, 105 + 82).widget(fluidFilterGroup).bindPlayerInventory(player.inventory, GuiTextures.SLOT, 7, 105).build(this, player);
}
use of gregtech.api.gui.widgets.WidgetGroup in project GregTech by GregTechCE.
the class CoverItemFilter method createUI.
@Override
public ModularUI createUI(EntityPlayer player) {
WidgetGroup filterGroup = new WidgetGroup();
filterGroup.addWidget(new LabelWidget(10, 5, titleLocale));
filterGroup.addWidget(new CycleButtonWidget(10, 20, 110, 20, GTUtility.mapToString(ItemFilterMode.values(), it -> it.localeName), () -> filterMode.ordinal(), (newMode) -> setFilterMode(ItemFilterMode.values()[newMode])));
this.itemFilter.initUI(45, filterGroup::addWidget);
return ModularUI.builder(GuiTextures.BACKGROUND, 176, 105 + 82).widget(filterGroup).bindPlayerInventory(player.inventory, GuiTextures.SLOT, 7, 105).build(this, player);
}
use of gregtech.api.gui.widgets.WidgetGroup in project GregTech by GregTechCE.
the class CoverRoboticArm method buildUI.
@Override
protected ModularUI buildUI(Builder builder, EntityPlayer player) {
WidgetGroup filterGroup = new WidgetGroup();
filterGroup.addWidget(new CycleButtonWidget(91, 45, 75, 20, TransferMode.class, this::getTransferMode, this::setTransferMode).setTooltipHoverString("cover.robotic_arm.transfer_mode.description"));
return super.buildUI(builder.widget(filterGroup), player);
}
Aggregations