Class PopupLayer
java.lang.Object
net.ixdarklord.folios.internal.client.screen.PopupLayer
A book's popup windows (
FoliosPopup), over everything else on the screen: the one a link under the pointer
shows, in place of a tooltip, and the one pressing it pinned, which stays where it was until the reader presses off
it, presses Esc or turns the page. A pinned one takes the pointer: its scene turns when dragged and zooms with the
wheel. Screens hand it the pointer in their own (GUI) pixels; its painter works in the popup's own.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanclick(FoliosReader reader, double mouseX, double mouseY) A press: on a pinned popup, what is under it; off it, puts it away.booleandrag(double dx, double dy) The pointer dragged (GUI pixels): true when it turns a pinned popup's scene.booleandraw(net.minecraft.client.gui.GuiGraphicsExtractor graphics, FoliosReader reader, FoliosPalette palette, @Nullable FoliosPopup hovered, int mouseX, int mouseY, float scale, int screenWidth, int screenHeight) Draws the pinned popup, else the one under the pointer; true when one under the pointer was drawn (the screen's tooltip is then left out).booleanescape(FoliosReader reader) Esc: true when it put a pinned popup away.voidrelease()booleanscroll(FoliosReader reader, double mouseX, double mouseY, double notches) The wheel: true when the pointer is over a pinned popup (zooming its scene, if over one).
-
Constructor Details
-
PopupLayer
public PopupLayer()
-
-
Method Details
-
draw
public boolean draw(net.minecraft.client.gui.GuiGraphicsExtractor graphics, FoliosReader reader, FoliosPalette palette, @Nullable FoliosPopup hovered, int mouseX, int mouseY, float scale, int screenWidth, int screenHeight) Draws the pinned popup, else the one under the pointer; true when one under the pointer was drawn (the screen's tooltip is then left out). -
click
A press: on a pinned popup, what is under it; off it, puts it away. True when the press was the popup's. -
drag
public boolean drag(double dx, double dy) The pointer dragged (GUI pixels): true when it turns a pinned popup's scene. -
release
public void release() -
scroll
The wheel: true when the pointer is over a pinned popup (zooming its scene, if over one). -
escape
Esc: true when it put a pinned popup away.
-