Interface FoliosPopup


public interface FoliosPopup
A small window a link opens over the book: under the pointer while it is over the link's words, and pinned in place once they are pressed, until the reader presses elsewhere or Esc. It has a title, centred along its top, and a body of its own drawing under it, through a painter as a page is drawn, so a scene in it can be turned and zoomed while it is pinned. Folios's own show an entity, a structure, a build or a multiblock (entity:, structure:, build: and multiblock: links); a mod adds its own with FoliosLinks.

A popup is made once for each link of a laid-out book and kept while the book is, so it can hold a scene.

  • Method Summary

    Modifier and Type
    Method
    Description
    void
    draw(FoliosPainter painter, boolean pinned)
    Draws its body, width() by height() from the painter's 0, 0.
    default int
    How tall its body is, in page pixels.
    net.minecraft.network.chat.Component
    Its title, along its top.
    default int
    How wide its body is, in page pixels.
  • Method Details

    • title

      net.minecraft.network.chat.Component title()
      Its title, along its top.
    • width

      default int width()
      How wide its body is, in page pixels.
    • height

      default int height()
      How tall its body is, in page pixels.
    • draw

      void draw(FoliosPainter painter, boolean pinned)
      Draws its body, width() by height() from the painter's 0, 0.
      Parameters:
      pinned - whether it is pinned, and can be pressed, dragged and scrolled; while it only follows the pointer it is for looking at