Interface FoliosLinks.Kind

Enclosing class:
FoliosLinks

public static interface FoliosLinks.Kind
What a kind of link does. Every method has a default, so a kind gives only what it needs.
  • Method Summary

    Modifier and Type
    Method
    Description
    default boolean
    isOpen(FoliosBook book, String target)
    Whether the reader can follow it now; a link that can't shows "Not yet discovered" and does nothing.
    default @Nullable FoliosPopup
    popup(FoliosLayout layout, String target)
    A window shown under the pointer in place of a tooltip, and pinned when the link is pressed; null for none.
    default boolean
    press(FoliosBook book, String target)
    The link pressed: true when it did something, false to pin its popup, if it has one.
    default List<net.minecraft.network.chat.Component>
    tooltip(FoliosBook book, String target)
    What the link says under the pointer: a title and lines under it; empty for nothing.
  • Method Details

    • tooltip

      default List<net.minecraft.network.chat.Component> tooltip(FoliosBook book, String target)
      What the link says under the pointer: a title and lines under it; empty for nothing.
    • popup

      @Nullable default @Nullable FoliosPopup popup(FoliosLayout layout, String target)
      A window shown under the pointer in place of a tooltip, and pinned when the link is pressed; null for none. Asked once for each link of a laid-out book; layout makes scenes for it (FoliosLayout.viewport(int, int)).
    • press

      default boolean press(FoliosBook book, String target)
      The link pressed: true when it did something, false to pin its popup, if it has one.
    • isOpen

      default boolean isOpen(FoliosBook book, String target)
      Whether the reader can follow it now; a link that can't shows "Not yet discovered" and does nothing.