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, and keeps the last whole
frame's for
GuiAreas. 1.20.1 draws at once rather than gathering a render state, so the boxes come from the
draw calls every GUI draw ends in (GuiGraphicsMixin, FontMixin), while GameRendererMixin and
ScreenMixin say which is being drawn and ScreenMixin and AbstractContainerScreenMixin pause
it over the screen's background. 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 is all drawn: what it drew becomes what the areas are.hud()static voidpause()static voidrecord(int x, int y, int width, int height) Records a box already in screen space, in GUI pixels.static voidrecord(org.joml.Matrix4f pose, float x1, float y1, float x2, float y2) Records a box drawn under a pose: its corners are taken to screen space (x and y only; the GUI's depth doesn't move anything sideways) and the box round them is recorded, so a scaled or turned draw is recorded where it shows.static booleanWhether a draw now would be recorded, so the callers can skip working out its box when it wouldn't.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() -
recording
public static boolean recording()Whether a draw now would be recorded, so the callers can skip working out its box when it wouldn't. -
record
public static void record(int x, int y, int width, int height) Records a box already in screen space, in GUI pixels. -
record
public static void record(org.joml.Matrix4f pose, float x1, float y1, float x2, float y2) Records a box drawn under a pose: its corners are taken to screen space (x and y only; the GUI's depth doesn't move anything sideways) and the box round them is recorded, so a scaled or turned draw is recorded where it shows. -
endFrame
public static void endFrame()The frame is all drawn: what it drew becomes what the areas are. -
hud
-
screen
-