Class GuiAreaRecorder

java.lang.Object
net.ixdarklord.coolcatcanvas.internal.client.gui.GuiAreaRecorder

public final class GuiAreaRecorder extends Object
Records the box of everything the HUD and the open screen's own pass draw each frame (GuiGraphicsMixin, on the primitives every draw ends in, while GameRendererMixin and ScreenMixin say which is being drawn), and keeps the last whole frame's for GuiAreas. Render thread only.
  • Method Details

    • begin

      public static GuiAreaRecorder.Phase begin(GuiAreaRecorder.Phase now)
      Starts recording for this part of the frame; returns the part it was, to end(net.ixdarklord.coolcatcanvas.internal.client.gui.GuiAreaRecorder.Phase) with.
    • end

      public static void end(GuiAreaRecorder.Phase was)
    • pause

      public static void pause()
    • resume

      public static void resume()
    • isRecording

      public static boolean isRecording()
      Whether a draw now would be recorded: checked first, so the primitives skip the maths when it wouldn't.
    • record

      public static void record(int x, int y, int width, int height)
    • record

      public static void record(org.joml.Matrix4f pose, float x1, float y1, float x2, float y2)
      Records the box between two corners in the pose's space: 1.21.1 draws at once, so the box is taken to the screen through the pose stack's matrix here (x and y only; the GUI's projection is flat), and its bounds kept.
    • endFrame

      public static void endFrame()
      The frame's GUI is all drawn: what it drew becomes what the areas are.
    • hud

      public static List<GuiArea> hud()
    • screen

      public static List<GuiArea> screen()