Search in sources :

Example 6 with ImageWidget

use of gregtech.api.gui.widgets.ImageWidget 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);
}
Also used : TankWidget(gregtech.api.gui.widgets.TankWidget) SlotWidget(gregtech.api.gui.widgets.SlotWidget) FluidContainerSlotWidget(gregtech.api.gui.widgets.FluidContainerSlotWidget) Builder(gregtech.api.gui.ModularUI.Builder) FluidContainerSlotWidget(gregtech.api.gui.widgets.FluidContainerSlotWidget) ImageWidget(gregtech.api.gui.widgets.ImageWidget)

Aggregations

ImageWidget (gregtech.api.gui.widgets.ImageWidget)6 Builder (gregtech.api.gui.ModularUI.Builder)5 SlotWidget (gregtech.api.gui.widgets.SlotWidget)5 FluidContainerSlotWidget (gregtech.api.gui.widgets.FluidContainerSlotWidget)4 TankWidget (gregtech.api.gui.widgets.TankWidget)4 ModularUI (gregtech.api.gui.ModularUI)2 CCRenderState (codechicken.lib.render.CCRenderState)1 IVertexOperation (codechicken.lib.render.pipeline.IVertexOperation)1 Matrix4 (codechicken.lib.vec.Matrix4)1 GTValues (gregtech.api.GTValues)1 GuiTextures (gregtech.api.gui.GuiTextures)1 ClickButtonWidget (gregtech.api.gui.widgets.ClickButtonWidget)1 CycleButtonWidget (gregtech.api.gui.widgets.CycleButtonWidget)1 DischargerSlotWidget (gregtech.api.gui.widgets.DischargerSlotWidget)1 LabelWidget (gregtech.api.gui.widgets.LabelWidget)1 SimpleTextWidget (gregtech.api.gui.widgets.SimpleTextWidget)1 ToggleButtonWidget (gregtech.api.gui.widgets.ToggleButtonWidget)1 MetaTileEntity (gregtech.api.metatileentity.MetaTileEntity)1 MetaTileEntityHolder (gregtech.api.metatileentity.MetaTileEntityHolder)1 TieredMetaTileEntity (gregtech.api.metatileentity.TieredMetaTileEntity)1