Skip to main content

Module design

Module design 

Source
Expand description

The .yui screen designer’s backend: the canvas drawn by yog-ui itself (the crate mods render with in game) through a recording YogGfxApi, rasterized with Minecraft’s own font and textures from the local game files; a preview mode driving the same tree with real UI events (click:X:Y, scroll:DY, scrollbar drags); and code-behind handlers.

Modules§

host
The designer host: a child process of the IDE (yog designer-host) that loads a mod’s library built for this machine (yog designer-lib) and draws the mod’s custom .yui components through the same recording YogGfxApi the designer uses — the mod’s own yog-ui and build code, out of the IDE’s process, so a panicking/crashing/looping component (or a rebuilt library) costs a restart of the host, never the IDE.

Structs§

RenderArgs
What render draws: a .yui screen’s tree at a screen size and scale.
Rendered
A screen drawn by render: its picture and where each element went.

Functions§

render
Draws a screen as the game would: its picture and its elements’ boxes.