use of gregtech.api.gui.widgets.FluidContainerSlotWidget in project GregTech by GregTechCE.
the class MetaTileEntityQuantumTank method createUI.
@Override
protected ModularUI createUI(EntityPlayer entityPlayer) {
Builder builder = ModularUI.defaultBuilder();
builder.image(7, 16, 81, 55, GuiTextures.DISPLAY);
TankWidget tankWidget = new TankWidget(fluidTank, 69, 52, 18, 18).setHideTooltip(true).setAlwaysShowFull(true);
builder.widget(tankWidget);
builder.label(11, 20, "gregtech.gui.fluid_amount", 0xFFFFFF);
builder.dynamicLabel(11, 30, tankWidget::getFormattedFluidAmount, 0xFFFFFF);
builder.dynamicLabel(11, 40, tankWidget::getFluidLocalizedName, 0xFFFFFF);
return builder.label(6, 6, getMetaFullName()).widget(new FluidContainerSlotWidget(containerInventory, 0, 90, 17, false).setBackgroundTexture(GuiTextures.SLOT, GuiTextures.IN_SLOT_OVERLAY)).widget(new ImageWidget(91, 36, 14, 15, GuiTextures.TANK_ICON)).widget(new SlotWidget(containerInventory, 1, 90, 54, true, false).setBackgroundTexture(GuiTextures.SLOT, GuiTextures.OUT_SLOT_OVERLAY)).bindPlayerInventory(entityPlayer.inventory).build(getHolder(), entityPlayer);
}
use of gregtech.api.gui.widgets.FluidContainerSlotWidget in project GregTech by GregTechCE.
the class MetaTileEntityPump method createUI.
@Override
protected ModularUI createUI(EntityPlayer entityPlayer) {
Builder builder = ModularUI.defaultBuilder();
builder.image(7, 16, 81, 55, GuiTextures.DISPLAY);
TankWidget tankWidget = new TankWidget(exportFluids.getTankAt(0), 69, 52, 18, 18).setHideTooltip(true).setAlwaysShowFull(true);
builder.widget(tankWidget);
builder.label(11, 20, "gregtech.gui.fluid_amount", 0xFFFFFF);
builder.dynamicLabel(11, 30, tankWidget::getFormattedFluidAmount, 0xFFFFFF);
builder.dynamicLabel(11, 40, tankWidget::getFluidLocalizedName, 0xFFFFFF);
return builder.label(6, 6, getMetaFullName()).widget(new FluidContainerSlotWidget(importItems, 0, 90, 17, false).setBackgroundTexture(GuiTextures.SLOT, GuiTextures.IN_SLOT_OVERLAY)).widget(new ImageWidget(91, 36, 14, 15, GuiTextures.TANK_ICON)).widget(new SlotWidget(exportItems, 0, 90, 54, true, false).setBackgroundTexture(GuiTextures.SLOT, GuiTextures.OUT_SLOT_OVERLAY)).bindPlayerInventory(entityPlayer.inventory).build(getHolder(), entityPlayer);
}
use of gregtech.api.gui.widgets.FluidContainerSlotWidget in project GregTech by GregTechCE.
the class MetaTileEntityFluidHatch method createTankUI.
public ModularUI.Builder createTankUI(IFluidTank fluidTank, IItemHandlerModifiable containerInventory, String title, EntityPlayer entityPlayer) {
Builder builder = ModularUI.defaultBuilder();
builder.image(7, 16, 81, 55, GuiTextures.DISPLAY);
TankWidget tankWidget = new TankWidget(fluidTank, 69, 52, 18, 18).setHideTooltip(true).setAlwaysShowFull(true);
builder.widget(tankWidget);
builder.label(11, 20, "gregtech.gui.fluid_amount", 0xFFFFFF);
builder.dynamicLabel(11, 30, tankWidget::getFormattedFluidAmount, 0xFFFFFF);
builder.dynamicLabel(11, 40, tankWidget::getFluidLocalizedName, 0xFFFFFF);
return builder.label(6, 6, title).widget(new FluidContainerSlotWidget(containerInventory, 0, 90, 17, false).setBackgroundTexture(GuiTextures.SLOT, GuiTextures.IN_SLOT_OVERLAY)).widget(new ImageWidget(91, 36, 14, 15, GuiTextures.TANK_ICON)).widget(new SlotWidget(containerInventory, 1, 90, 54, true, false).setBackgroundTexture(GuiTextures.SLOT, GuiTextures.OUT_SLOT_OVERLAY)).bindPlayerInventory(entityPlayer.inventory);
}
use of gregtech.api.gui.widgets.FluidContainerSlotWidget in project GregTech by GregTechCE.
the class SimpleGeneratorMetaTileEntity method createGuiTemplate.
protected ModularUI.Builder createGuiTemplate(EntityPlayer player) {
Builder builder = ModularUI.defaultBuilder();
builder.image(7, 16, 81, 55, GuiTextures.DISPLAY);
TankWidget tankWidget = new TankWidget(importFluids.getTankAt(0), 69, 52, 18, 18).setHideTooltip(true).setAlwaysShowFull(true);
builder.widget(tankWidget);
builder.label(11, 20, "gregtech.gui.fluid_amount", 0xFFFFFF);
builder.dynamicLabel(11, 30, tankWidget::getFormattedFluidAmount, 0xFFFFFF);
builder.dynamicLabel(11, 40, tankWidget::getFluidLocalizedName, 0xFFFFFF);
return builder.label(6, 6, getMetaFullName()).widget(new FluidContainerSlotWidget(containerInventory, 0, 90, 17, true).setBackgroundTexture(GuiTextures.SLOT, GuiTextures.IN_SLOT_OVERLAY)).widget(new ImageWidget(91, 36, 14, 15, GuiTextures.TANK_ICON)).widget(new SlotWidget(containerInventory, 1, 90, 54, true, false).setBackgroundTexture(GuiTextures.SLOT, GuiTextures.OUT_SLOT_OVERLAY)).bindPlayerInventory(player.inventory);
}
Aggregations