Class ExpressionBreadcrumb

java.lang.Object
org.cyclops.integrateddynamics.core.logicprogrammer.client.ExpressionBreadcrumb

public final class ExpressionBreadcrumb extends Object
The tabs above the slots for the operators from the root of an expression to the one in the slots.
  • Method Details

    • render

      public static void render(net.minecraft.client.gui.GuiGraphicsExtractor guiGraphics, int guiLeft, int guiTop, net.minecraft.client.gui.Font font, ExpressionEditor editor, ExpressionTypeChecker.Result result, Consumer<int[]> navigate, List<ExpressionPanelRendering.Region> regions)
      Draw the tabs, if an operator below the root is in the slots.
      Parameters:
      navigate - Opens the operator at a path.
      regions - Where the regions to click are added.
    • layout

      public static List<ExpressionBreadcrumb.Tab> layout(net.minecraft.client.gui.Font font, List<String> names, int available)
      Lay out the tabs in the given width, as paths are shortened: the tabs in the middle that do not fit are collapsed into one, and the names of the others are cut off if they still do not fit.
      Parameters:
      font - The font.
      names - The names of the operators from the root to the edited one.
      available - The width.
      Returns:
      The tabs to draw, where a collapsed one leads to the last operator it stands for.