Class GuiAreaRecorder
java.lang.Object
net.ixdarklord.coolcatcanvas.internal.client.gui.GuiAreaRecorder
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.-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic GuiAreaRecorder.PhaseStarts recording for this part of the frame; returns the part it was, toend(net.ixdarklord.coolcatcanvas.internal.client.gui.GuiAreaRecorder.Phase)with.static voidend(GuiAreaRecorder.Phase was) static voidendFrame()The frame's GUI is all drawn: what it drew becomes what the areas are.hud()static booleanWhether a draw now would be recorded: checked first, so the primitives skip the maths when it wouldn't.static voidpause()static voidrecord(int x, int y, int width, int height) static voidrecord(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.static voidresume()screen()
-
Method Details
-
begin
Starts recording for this part of the frame; returns the part it was, toend(net.ixdarklord.coolcatcanvas.internal.client.gui.GuiAreaRecorder.Phase)with. -
end
-
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
-
screen
-