Search in sources :

Example 1 with ModularUI

use of com.lowdragmc.lowdraglib.gui.modular.ModularUI in project Multiblocked by Low-Drag-MC.

the class ControllerTileTesterEntity method createUI.

@Override
public ModularUI createUI(PlayerEntity entityPlayer) {
    if (Multiblocked.isClient() && Multiblocked.isSinglePlayer()) {
        TabContainer tabContainer = new TabContainer(0, 0, 200, 232);
        new ControllerScriptWidget(this, tabContainer);
        if (getDefinition() != DEFAULT_DEFINITION) {
            if (!traits.isEmpty())
                initTraitUI(tabContainer, entityPlayer);
            if (isFormed()) {
                new RecipePage(this, tabContainer);
                new IOPageWidget(this, tabContainer);
            } else {
                new StructurePageWidget(this.definition, tabContainer);
            }
        }
        return new ModularUI(196, 256, this, entityPlayer).widget(tabContainer);
    }
    return null;
}
Also used : RecipePage(com.lowdragmc.multiblocked.api.gui.controller.RecipePage) StructurePageWidget(com.lowdragmc.multiblocked.api.gui.controller.structure.StructurePageWidget) ModularUI(com.lowdragmc.lowdraglib.gui.modular.ModularUI) TabContainer(com.lowdragmc.lowdraglib.gui.widget.TabContainer) IOPageWidget(com.lowdragmc.multiblocked.api.gui.controller.IOPageWidget) ControllerScriptWidget(com.lowdragmc.multiblocked.api.gui.tester.ControllerScriptWidget)

Example 2 with ModularUI

use of com.lowdragmc.lowdraglib.gui.modular.ModularUI in project Multiblocked by Low-Drag-MC.

the class PartTileTesterEntity method createUI.

@Override
public ModularUI createUI(PlayerEntity entityPlayer) {
    if (Multiblocked.isClient() && Multiblocked.isSinglePlayer()) {
        TabContainer tabContainer = new TabContainer(0, 0, 200, 232);
        new PartScriptWidget(this, tabContainer);
        if (getDefinition() != DEFAULT_DEFINITION) {
            if (!traits.isEmpty())
                initTraitUI(tabContainer, entityPlayer);
        }
        return new ModularUI(196, 256, this, entityPlayer).widget(tabContainer);
    }
    return null;
}
Also used : ModularUI(com.lowdragmc.lowdraglib.gui.modular.ModularUI) TabContainer(com.lowdragmc.lowdraglib.gui.widget.TabContainer) PartScriptWidget(com.lowdragmc.multiblocked.api.gui.tester.PartScriptWidget)

Example 3 with ModularUI

use of com.lowdragmc.lowdraglib.gui.modular.ModularUI in project Multiblocked by Low-Drag-MC.

the class BlueprintTableTileEntity method createUI.

@Override
public ModularUI createUI(PlayerEntity entityPlayer) {
    if (isFormed()) {
        return new ModularUI(384, 256, this, entityPlayer).widget(new BlueprintTableWidget(this));
    } else {
        TabContainer tabContainer = new TabContainer(0, 0, 200, 232);
        new StructurePageWidget(this.definition, tabContainer);
        return new ModularUI(196, 256, this, entityPlayer).widget(tabContainer);
    }
}
Also used : ModularUI(com.lowdragmc.lowdraglib.gui.modular.ModularUI) StructurePageWidget(com.lowdragmc.multiblocked.api.gui.controller.structure.StructurePageWidget) BlueprintTableWidget(com.lowdragmc.multiblocked.api.gui.blueprint_table.BlueprintTableWidget) TabContainer(com.lowdragmc.lowdraglib.gui.widget.TabContainer)

Example 4 with ModularUI

use of com.lowdragmc.lowdraglib.gui.modular.ModularUI in project Multiblocked by Low-Drag-MC.

the class ComponentTileEntity method createUI.

@Override
public ModularUI createUI(PlayerEntity PlayerEntity) {
    if (traits.isEmpty())
        return null;
    TabContainer tabContainer = new TabContainer(0, 0, 200, 232);
    initTraitUI(tabContainer, PlayerEntity);
    return new ModularUI(196, 256, this, PlayerEntity).widget(tabContainer);
}
Also used : ModularUI(com.lowdragmc.lowdraglib.gui.modular.ModularUI) TabContainer(com.lowdragmc.lowdraglib.gui.widget.TabContainer)

Example 5 with ModularUI

use of com.lowdragmc.lowdraglib.gui.modular.ModularUI in project Multiblocked by Low-Drag-MC.

the class ControllerTileEntity method createUI.

@Override
public ModularUI createUI(PlayerEntity entityPlayer) {
    TabContainer tabContainer = new TabContainer(0, 0, 200, 232);
    if (!traits.isEmpty())
        initTraitUI(tabContainer, entityPlayer);
    if (isFormed()) {
        new RecipePage(this, tabContainer);
        new IOPageWidget(this, tabContainer);
    } else {
        new StructurePageWidget(this.definition, tabContainer);
    }
    return new ModularUI(196, 256, this, entityPlayer).widget(tabContainer);
}
Also used : RecipePage(com.lowdragmc.multiblocked.api.gui.controller.RecipePage) StructurePageWidget(com.lowdragmc.multiblocked.api.gui.controller.structure.StructurePageWidget) ModularUI(com.lowdragmc.lowdraglib.gui.modular.ModularUI) TabContainer(com.lowdragmc.lowdraglib.gui.widget.TabContainer) IOPageWidget(com.lowdragmc.multiblocked.api.gui.controller.IOPageWidget)

Aggregations

ModularUI (com.lowdragmc.lowdraglib.gui.modular.ModularUI)5 TabContainer (com.lowdragmc.lowdraglib.gui.widget.TabContainer)5 StructurePageWidget (com.lowdragmc.multiblocked.api.gui.controller.structure.StructurePageWidget)3 IOPageWidget (com.lowdragmc.multiblocked.api.gui.controller.IOPageWidget)2 RecipePage (com.lowdragmc.multiblocked.api.gui.controller.RecipePage)2 BlueprintTableWidget (com.lowdragmc.multiblocked.api.gui.blueprint_table.BlueprintTableWidget)1 ControllerScriptWidget (com.lowdragmc.multiblocked.api.gui.tester.ControllerScriptWidget)1 PartScriptWidget (com.lowdragmc.multiblocked.api.gui.tester.PartScriptWidget)1