Skip to main content

Module book

Module book 

Source
Expand description

In-game book/documentation system (Patchouli-like).

Modules§

book_ui
font
Custom TTF/OTF font support for book rendering. Uses fontdue to rasterize glyphs into a packed atlas texture (RGBA8).
renderer
Book renderer — ties together yog-ui layout, yog-gfx GPU pipeline, SVG icon rasterization, and custom font rendering.
state
Per-book navigation state.
svg
SVG rasterization → RGBA pixel buffer.
theme
Visual theme for book rendering.

Structs§

Book
The top-level book definition — replaces patchouli_books/<id>/book.json.
BookCategory
Represents a book category tab (e.g. “Basics”, “Patterns”).
BookEntry
One entry in a book (like a “page” in the TOC sidebar).
BookFont
Reference to a registered font — serializable, stored in BookPage::CustomText. The actual TTF bytes live in BookFontRegistry (registered separately).
BookMacro
A macro substitution (e.g. $(thing) → red color span).
BookRegistry
Global registry for all in-game books.
BookRenderer
BookTheme
All colors are 0xAARRGGBB.
BookViewState

Enums§

BookPage
A single page variant inside a book entry.

Functions§

crafting_page
crafting_page_with_text
entity_page
image_page
pattern_page
relations_page
smelting_page
spotlight_page
text_page