Class UIRenderer

java.lang.Object
me.hackware.api.gui.layout.UIRenderer

public final class UIRenderer extends Object
Entry point for measuring, laying out, and rendering a UI element tree. Handles resolving the root element's absolute position within the viewport.
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    render(UIElement<?> root, net.minecraft.client.gui.GuiGraphics graphics, net.minecraft.client.gui.Font font, int viewportWidth, int viewportHeight)
    Measure, lay out, and render a UI tree within the given viewport.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • render

      public static void render(UIElement<?> root, net.minecraft.client.gui.GuiGraphics graphics, net.minecraft.client.gui.Font font, int viewportWidth, int viewportHeight)
      Measure, lay out, and render a UI tree within the given viewport.
      Parameters:
      root - The root element of the UI tree
      graphics - Minecraft's GuiGraphics context
      font - The font to use for text measurement and rendering
      viewportWidth - Screen width in pixels
      viewportHeight - Screen height in pixels