Search in sources :

Example 1 with GuiElementContainerScissor

use of buildcraft.lib.gui.elem.GuiElementContainerScissor in project BuildCraft by BuildCraft.

the class ElementTypeContainer method deserialize0.

@Override
protected IGuiElement deserialize0(BuildCraftJsonGui gui, IGuiPosition parent, JsonGuiInfo info, JsonGuiElement json) {
    FunctionContext ctx = createContext(json);
    boolean scissor = resolveEquationBool(json, "limit", ctx, false);
    if (scissor) {
        IGuiArea area = resolveArea(json, "area", parent, ctx);
        return new GuiElementContainerScissor(gui, area);
    } else {
        IGuiPosition pos = resolvePosition(json, "pos", parent, ctx);
        return new GuiElementContainerResizing(gui, pos);
    }
}
Also used : IGuiArea(buildcraft.lib.gui.pos.IGuiArea) GuiElementContainerScissor(buildcraft.lib.gui.elem.GuiElementContainerScissor) GuiElementContainerResizing(buildcraft.lib.gui.elem.GuiElementContainerResizing) FunctionContext(buildcraft.lib.expression.FunctionContext) IGuiPosition(buildcraft.lib.gui.pos.IGuiPosition)

Aggregations

FunctionContext (buildcraft.lib.expression.FunctionContext)1 GuiElementContainerResizing (buildcraft.lib.gui.elem.GuiElementContainerResizing)1 GuiElementContainerScissor (buildcraft.lib.gui.elem.GuiElementContainerScissor)1 IGuiArea (buildcraft.lib.gui.pos.IGuiArea)1 IGuiPosition (buildcraft.lib.gui.pos.IGuiPosition)1