Skip to main content

Module ui

Module ui 

Source
Expand description

Screens: .yui read and compiled to Rust (yui), components, the grid and resources they use, their view models (vm), a mod’s book page kinds and recipe areas.

Modules§

book_page
A mod’s own kinds of book page: .yui components with book_page, compiled into yog_formats::book::page_type::PageTypes for the books that use them (see that module).
component
Component .yui files: a <Component> root declaring properties and events, with one body element bound to them through {x:Bind ...} (the same bindings as view-model screens, [crate::ui::vm::compile_bind]). Generates a struct with one typed field per property and its yog_api::ui::component::Component implementation, registered with ui_component!. See Yog-IDLE’s docs/yui.md, “Components”.
grid
<Grid> in .yui — WPF’s Grid: rows and columns, children placed in cells with attached Grid.Row / Grid.Column / Grid.RowSpan / Grid.ColumnSpan.
recipe_area
<RecipeArea kind="crusher" x="…" y="…"/> in an inventory screen: the kind’s layout (its .yui recipe_layout, see yog_formats::book::layout) made real — its places become the container’s slots (numbered after the screen’s own), its result an output slot, its pictures and stations drawn — and a <Machine> that tells the game which slot is which: the block makes recipes of the kind like a crafting table.
yui
.yui screen files — the declarative form of a yog-ui widget tree that Yog-IDLE’s screen designer edits — and their code generation.