Search in sources :

Example 1 with AdvancedTextWidget

use of gregtech.api.gui.widgets.AdvancedTextWidget in project GregTech by GregTechCE.

the class MetaTileEntityQuantumChest method createUI.

@Override
protected ModularUI createUI(EntityPlayer entityPlayer) {
    Builder builder = ModularUI.defaultBuilder();
    builder.image(7, 16, 81, 55, GuiTextures.DISPLAY);
    builder.widget(new AdvancedTextWidget(11, 20, this::addDisplayInformation, 0xFFFFFF));
    return builder.label(6, 6, getMetaFullName()).widget(new SlotWidget(importItems, 0, 90, 17, true, true).setBackgroundTexture(GuiTextures.SLOT, GuiTextures.IN_SLOT_OVERLAY)).widget(new SlotWidget(exportItems, 0, 90, 54, true, false).setBackgroundTexture(GuiTextures.SLOT, GuiTextures.OUT_SLOT_OVERLAY)).bindPlayerInventory(entityPlayer.inventory).build(getHolder(), entityPlayer);
}
Also used : SlotWidget(gregtech.api.gui.widgets.SlotWidget) Builder(gregtech.api.gui.ModularUI.Builder) AdvancedTextWidget(gregtech.api.gui.widgets.AdvancedTextWidget)

Example 2 with AdvancedTextWidget

use of gregtech.api.gui.widgets.AdvancedTextWidget in project GregTech by GregTechCE.

the class MultiblockWithDisplayBase method createUITemplate.

protected ModularUI.Builder createUITemplate(EntityPlayer entityPlayer) {
    ModularUI.Builder builder = ModularUI.extendedBuilder();
    builder.image(7, 4, 162, 121, GuiTextures.DISPLAY);
    builder.label(11, 9, getMetaFullName(), 0xFFFFFF);
    builder.widget(new AdvancedTextWidget(11, 19, this::addDisplayText, 0xFFFFFF).setMaxWidthLimit(156).setClickHandler(this::handleDisplayClick));
    builder.bindPlayerInventory(entityPlayer.inventory, 134);
    return builder;
}
Also used : ModularUI(gregtech.api.gui.ModularUI) AdvancedTextWidget(gregtech.api.gui.widgets.AdvancedTextWidget)

Aggregations

AdvancedTextWidget (gregtech.api.gui.widgets.AdvancedTextWidget)2 ModularUI (gregtech.api.gui.ModularUI)1 Builder (gregtech.api.gui.ModularUI.Builder)1 SlotWidget (gregtech.api.gui.widgets.SlotWidget)1