Class LytBox

All Implemented Interfaces:
LytBlockContainer, LytErrorSink, Styleable
Direct Known Subclasses:
LytAxisBox, LytGuidebookScene, LytItemGrid, LytSlotGrid

public abstract class LytBox extends LytBlock implements LytBlockContainer
  • Field Details

    • children

      protected final List<LytBlock> children
    • paddingLeft

      protected int paddingLeft
    • paddingTop

      protected int paddingTop
    • paddingRight

      protected int paddingRight
    • paddingBottom

      protected int paddingBottom
  • Constructor Details

    • LytBox

      public LytBox()
  • Method Details

    • removeChild

      public void removeChild(LytNode node)
      Overrides:
      removeChild in class LytNode
    • append

      public void append(LytBlock block)
      Specified by:
      append in interface LytBlockContainer
    • clearContent

      public void clearContent()
    • computeBoxLayout

      protected abstract LytRect computeBoxLayout(LayoutContext context, int x, int y, int availableWidth)
    • computeLayout

      protected final LytRect computeLayout(LayoutContext context, int x, int y, int availableWidth)
      Specified by:
      computeLayout in class LytBlock
    • onLayoutMoved

      protected void onLayoutMoved(int deltaX, int deltaY)
      Description copied from class: LytBlock
      Implement to react to layout previously computed by LytBlock.computeLayout(guideme.layout.LayoutContext, int, int, int) being moved.
      Specified by:
      onLayoutMoved in class LytBlock
    • setPadding

      public final void setPadding(int padding)
    • setPaddingLeft

      public void setPaddingLeft(int paddingLeft)
    • setPaddingTop

      public void setPaddingTop(int paddingTop)
    • setPaddingRight

      public void setPaddingRight(int paddingRight)
    • setPaddingBottom

      public void setPaddingBottom(int paddingBottom)
    • getBackgroundColor

      @Nullable public @Nullable SymbolicColor getBackgroundColor()
    • setBackgroundColor

      public void setBackgroundColor(@Nullable @Nullable SymbolicColor backgroundColor)
    • getChildren

      public List<? extends LytNode> getChildren()
      Overrides:
      getChildren in class LytNode
    • renderBatch

      public void renderBatch(RenderContext context, net.minecraft.client.renderer.MultiBufferSource buffers)
      Specified by:
      renderBatch in class LytBlock
    • render

      public void render(RenderContext context)
      Specified by:
      render in class LytBlock