Skip to main content

Crate yog_book

Crate yog_book 

Source
Expand description

yog-book — the renderer guide books (the .ybook format, yog_formats::book) are drawn with, in the game and in Yog-IDLE (BookRenderer, draw2d alone).

Re-exports§

pub use renderer::BOOK_PNG;
pub use renderer::BookRenderer;
pub use renderer::CRAFTING_PNG;
pub use renderer::LANG;
pub use renderer::PageDrawer;
pub use state::BookViewState;

Modules§

layout_picture
What a recipe layout draws whatever the recipe — its images, its slot frames, its stations — as pieces in the layout’s own pixels: the book and Yog-IDLE’s recipe editor each draw these their own way.
markup
Book texts are Yog text (yog_ui::rich: {b|…}, {#rrggbb|…}, …) with words of the book’s own, turned into Yog text’s when the book is prepared:
recipe_area
A recipe layout on an inventory screen (<RecipeArea>): its pictures and stations as .yui elements, its places and result as real slots.
renderer
Book renderer: yog-ui lays the book out and draws its text and buttons; everything else goes through draw2d too — the sprite sheets, item icons, SVG pages, entities — so the game and Yog-IDLE’s book designer run the same code.
state
Per-book navigation state.
theme
Visual theme for book rendering.

Structs§

BookTheme

Constants§

BOOK_SHEET
The image sources the book draws BOOK_PNG and CRAFTING_PNG as: the loader ships them under assets/yog/textures/gui/book/ (Yog-IDLE resolves them to the bytes). The book’s pictures.
CRAFTING_SHEET
The image sources the book draws BOOK_PNG and CRAFTING_PNG as: the loader ships them under assets/yog/textures/gui/book/ (Yog-IDLE resolves them to the bytes).

Functions§

ingredient_items
ingredient — items, and tags (#ns:path) — as the items it shows in turn: each tag replaced by its items.
set_tag_items
Tells the books how to find an item tag’s items.
set_unlocked
Tells the books how to know what the reader has unlocked.
shown
Whether entry shows in the book’s lists: not secret, and its advancement (if it waits for one) had.