Class Shapes
java.lang.Object
net.ixdarklord.folios.internal.client.page.Shapes
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumThe little controls printed on pages: each a pixel icon on a clasp ('X' in its ink, 'o' a softer shade). -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intHow big a clasp is, square.static final intHow many leaves of a book's block show past its pages, a pixel each.static final intThe spine's width between a screen book's pages, which a spread's halves draw on into to meet. -
Method Summary
Modifier and TypeMethodDescriptionstatic voidacrossFold(GuidePainter painter, net.minecraft.util.FormattedCharSequence line, int y, int color, boolean right) A line of text centred on a spread's fold, as each page of it prints it: only the letters whose middle is on its side, placed so the halves meet as one line while the book lies open (on a screen book, across the spine between the pages).static voidarrow(GuidePainter painter, int x, int y, int color) A small arrow pointing right, 9 by 7 pixels from (x, y).static voidbutton(GuidePainter painter, int x, int y, Shapes.Icon icon, boolean hovered) A control: an eight-sided clasp of the page's own paper with a hairline rim and its icon in the middle.static voiddeckle(GuidePainter painter, int x0, int x1, int y, boolean down, int behind) A page's rough-cut edge along its head (downfalse: the edge is rowy, the page below it) or its foot (downtrue: the page above): small irregular bites out of the paper, showingbehind, and a faint worn line where the edge is whole.static voiddeckle(GuidePainter painter, int x0, int x1, int y, boolean down, int behind, float wear) Asdeckle(GuidePainter, int, int, int, boolean, int), cut rougher for awearover 1.static voidforeEdge(GuidePainter painter, int x, int y0, int y1, boolean right) The fore-edge of a book's leaves: the block of pages showing past the page, a pixel a leaf, fromx(the page's edge) outwards, rightwards or leftwards; fromy0toy1.static voidforeEdge(GuidePainter painter, int x, int y0, int y1, boolean right, int leaves) The same,leaveswide.static voidnumberButton(GuidePainter painter, int x, int y, int width, String number, boolean hovered, boolean picked) A claspwidthwide with a number on it in place of an icon, for picking one of several things a page shows.static voidpageFrame(GuidePainter painter, net.minecraft.resources.ResourceLocation texture, int width, int height) The page's frame, drawn under what is on it: the book's frame texture over the whole page, tinted between the page's lines and the book's colour, so it sits as quietly on dark paper as on parchment.static voidpageFrame(GuidePainter painter, net.minecraft.resources.ResourceLocation texture, int width, int height, @Nullable GuidePage.Laid page, boolean right) The page's frame, or for half of a spread the frame joined with the other half's: its side at the fold left out, its top and bottom running on (a plain middle column of the texture, stretched) to meet the other page's.static voidpanel(GuidePainter painter, int x0, int y0, int x1, int y1) A panel: its corner pixels left out, so it reads as slightly rounded.static intribbonRoot(int edge, int depth) Where a ribbon tuckeddepthleaves deep comes out of the fore-edge at the page'sedge.static voidslot(GuidePainter painter, int x, int y) An 18-pixel slot for an item drawn at (x + 1, y + 1).static inttabDepth(int order, float out) How deep among the leaves a tab is tucked, in leaves: the top one just under the surface, each below a little deeper; the open one (and, part way, one under the pointer) rises to the surface.static inttabDepth(int order, float out, int leaves) The same, in a fore-edgeleaveswide.static voidtuck(GuidePainter painter, int edge, int y, int height, int depth, int ribbon) Over a ribbon's root, the leaves above it: they lie on it from the page'sedgeto where it comes out of the block, so it is seen between the leaves at its depth; and a soft shadow they cast on it as it leaves them.static voidwornEdges(GuidePainter painter, int x0, int y0, int x1, int y1, boolean outerRight, int behind) A page worn with age, from x0 to x1 and y0 to y1: yellowing creeping in from its head, its foot and its outer side (not its fold) unevenly, deeper here and shallower there; a few faint stains; and the odd small nick or tear in its outer edge.static voidwornEdges(GuidePainter painter, int x0, int y0, int x1, int y1, boolean outerRight, int behind, float wear) AswornEdges(GuidePainter, int, int, int, int, boolean, int), as worn aswearsays: 1 lightly, more for a well-thumbed book, its yellowing deeper and stronger, its nicks more and bigger, more stains, and its outer corners rubbed dark.
-
Field Details
-
SCREEN_SPINE
public static final int SCREEN_SPINEThe spine's width between a screen book's pages, which a spread's halves draw on into to meet.- See Also:
-
FORE_EDGE
public static final int FORE_EDGEHow many leaves of a book's block show past its pages, a pixel each.- See Also:
-
BUTTON
public static final int BUTTONHow big a clasp is, square.- See Also:
-
-
Method Details
-
panel
A panel: its corner pixels left out, so it reads as slightly rounded. -
slot
An 18-pixel slot for an item drawn at (x + 1, y + 1). -
pageFrame
public static void pageFrame(GuidePainter painter, net.minecraft.resources.ResourceLocation texture, int width, int height) The page's frame, drawn under what is on it: the book's frame texture over the whole page, tinted between the page's lines and the book's colour, so it sits as quietly on dark paper as on parchment. On a page larger than the default its corners and the ornaments at the middle of its head and foot keep their size; only the plain runs of line between them are drawn longer. -
pageFrame
public static void pageFrame(GuidePainter painter, net.minecraft.resources.ResourceLocation texture, int width, int height, @Nullable GuidePage.Laid page, boolean right) The page's frame, or for half of a spread the frame joined with the other half's: its side at the fold left out, its top and bottom running on (a plain middle column of the texture, stretched) to meet the other page's. -
acrossFold
public static void acrossFold(GuidePainter painter, net.minecraft.util.FormattedCharSequence line, int y, int color, boolean right) A line of text centred on a spread's fold, as each page of it prints it: only the letters whose middle is on its side, placed so the halves meet as one line while the book lies open (on a screen book, across the spine between the pages). Nothing is drawn past the page, so a leaf turning carries its own letters and leaves none behind. -
foreEdge
The fore-edge of a book's leaves: the block of pages showing past the page, a pixel a leaf, fromx(the page's edge) outwards, rightwards or leftwards; fromy0toy1. -
foreEdge
The same,leaveswide. -
deckle
A page's rough-cut edge along its head (downfalse: the edge is rowy, the page below it) or its foot (downtrue: the page above): small irregular bites out of the paper, showingbehind, and a faint worn line where the edge is whole. -
deckle
public static void deckle(GuidePainter painter, int x0, int x1, int y, boolean down, int behind, float wear) Asdeckle(GuidePainter, int, int, int, boolean, int), cut rougher for awearover 1. -
wornEdges
public static void wornEdges(GuidePainter painter, int x0, int y0, int x1, int y1, boolean outerRight, int behind) A page worn with age, from x0 to x1 and y0 to y1: yellowing creeping in from its head, its foot and its outer side (not its fold) unevenly, deeper here and shallower there; a few faint stains; and the odd small nick or tear in its outer edge.outerRightfor a right-hand page, whose outer side is at x1. Drawn over the paper, under what is on the page; the same every frame. -
wornEdges
public static void wornEdges(GuidePainter painter, int x0, int y0, int x1, int y1, boolean outerRight, int behind, float wear) AswornEdges(GuidePainter, int, int, int, int, boolean, int), as worn aswearsays: 1 lightly, more for a well-thumbed book, its yellowing deeper and stronger, its nicks more and bigger, more stains, and its outer corners rubbed dark. -
tabDepth
public static int tabDepth(int order, float out) How deep among the leaves a tab is tucked, in leaves: the top one just under the surface, each below a little deeper; the open one (and, part way, one under the pointer) rises to the surface.orderis its place from the top,outhow far it is out (TabMotion.out). -
tabDepth
public static int tabDepth(int order, float out, int leaves) The same, in a fore-edgeleaveswide. -
ribbonRoot
public static int ribbonRoot(int edge, int depth) Where a ribbon tuckeddepthleaves deep comes out of the fore-edge at the page'sedge. -
tuck
Over a ribbon's root, the leaves above it: they lie on it from the page'sedgeto where it comes out of the block, so it is seen between the leaves at its depth; and a soft shadow they cast on it as it leaves them.ribbonis the tab's colour, for its shadow. -
button
A control: an eight-sided clasp of the page's own paper with a hairline rim and its icon in the middle. Under the pointer it lifts off the page, casting a little shadow, and its icon takes the book's colour. -
numberButton
public static void numberButton(GuidePainter painter, int x, int y, int width, String number, boolean hovered, boolean picked) A claspwidthwide with a number on it in place of an icon, for picking one of several things a page shows. The one picked is pressed into the page, its face of the book's colour; another lifts under the pointer. -
arrow
A small arrow pointing right, 9 by 7 pixels from (x, y).
-