Class GuideBar
java.lang.Object
net.ixdarklord.folios.internal.client.screen.GuideBar
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceGives the search field the keyboard: the screen's focus and the field's own. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final PixelIconLines of a list, for the index tab.static final intWhere its content starts, below its top gilt line.static final PixelIconA four-pointed sparkle, marking what hasn't been read yet, as the frames of its blink: from a point of light through a small star to its resting shape and a flare with its points drawn out.static final PixelIconstatic final PixelIconThe star, its edge only: a page not yet bookmarked. -
Constructor Summary
ConstructorsConstructorDescriptionGuideBar(GuideReader reader, boolean modeToggle, @Nullable Runnable close, GuideBar.Focus focus) -
Method Summary
Modifier and TypeMethodDescriptionvoiddraw(GuidePainter painter, int width, float appear) Draws it in its own pixels, the given width across.palette()The colours its painter is given: the cover's, so what is drawn see-through lies over the leather.static voidpixels(GuidePainter painter, PixelIcon icon, int boxX, int boxY, int boxSize, int color) The same, through a painter (a page, a handheld book's tab, the bar).net.ixdarklord.coolcatcanvas.internal.client.gui.style.StyledEditBoxsearch(@Nullable net.ixdarklord.coolcatcanvas.internal.client.gui.style.StyledEditBox before) Makes the search field, carrying over what an earlier one held; the screen adds it as a widget.@Nullable net.ixdarklord.coolcatcanvas.internal.client.gui.style.StyledEditBoxfloatshown()How open it is, 0 folded to 1 open, eased.static voidsparkle(GuidePainter painter, int x, int y, float phase, int color) Draws the unread sparkle, 7 pixels square from (x, y), blinking now and then;phase(seconds) staggers sparkles so they don't all blink together.booleantyping()
-
Field Details
-
HEIGHT
public static final int HEIGHT- See Also:
-
INSET
public static final int INSETWhere its content starts, below its top gilt line.- See Also:
-
STAR
-
STAR_OUTLINE
The star, its edge only: a page not yet bookmarked. -
SPARKLE
A four-pointed sparkle, marking what hasn't been read yet, as the frames of its blink: from a point of light through a small star to its resting shape and a flare with its points drawn out. -
INDEX
Lines of a list, for the index tab.
-
-
Constructor Details
-
GuideBar
public GuideBar(GuideReader reader, boolean modeToggle, @Nullable @Nullable Runnable close, GuideBar.Focus focus) - Parameters:
modeToggle- whether it has the light/dark paper button (a book whose paper follows the mode)close- what its close button does, or null for nonefocus- how the screen gives the search field the keyboard
-
-
Method Details
-
search
public net.ixdarklord.coolcatcanvas.internal.client.gui.style.StyledEditBox search(@Nullable @Nullable net.ixdarklord.coolcatcanvas.internal.client.gui.style.StyledEditBox before) Makes the search field, carrying over what an earlier one held; the screen adds it as a widget. It is kept off the screen: it only takes the keys, and the bar shows what is in it. -
searchField
@Nullable public @Nullable net.ixdarklord.coolcatcanvas.internal.client.gui.style.StyledEditBox searchField() -
typing
public boolean typing() -
shown
public float shown()How open it is, 0 folded to 1 open, eased. -
palette
The colours its painter is given: the cover's, so what is drawn see-through lies over the leather. -
draw
Draws it in its own pixels, the given width across.appear, 0 to 1, grows it out of its pull as it comes (a handheld book's, once the book is open); 1 when it is simply there. -
sparkle
Draws the unread sparkle, 7 pixels square from (x, y), blinking now and then;phase(seconds) staggers sparkles so they don't all blink together. Brighter on its flare. The blink is smooth: the sparkle eases from rest out to its flare, down to a point and back, each pixel fading between the frames on either side. -
pixels
public static void pixels(GuidePainter painter, PixelIcon icon, int boxX, int boxY, int boxSize, int color) The same, through a painter (a page, a handheld book's tab, the bar).
-