REDNODE / DOCS

Ink list

Example apps / ink-list / v0.1.0

Node modneeds codeware

A list of contracts on the HUD built from data with ink.list, with buttons that add, remove, move and rename items, and a header rebuilt with mount.update.

Simulated game starting
Mod log

    The box stands for the game's screen; the Mod log shows each change.

    How it works

    ink.list(props, render, key) draws one node per item. list.set({ items }) compares the new items with the old by key: new ones are added at their place, gone ones removed, moved ones moved, and the rest drawn again and compared, so only changed props go to the game.

    mount.update(tree) does the same for a whole tree built again from data: nodes of the same tag keep their widgets, children are matched by place.

    In the game, the plugin logs each batch that adds, removes or moves widgets, with its counts.

    What it uses

    ink.list list.set({ items }) mount.update keys

    Try this

    Use it

    Copy the files into red4ext/plugins/REDnode/apps/ink-list/ in the game folder, or start your own package from them: change id and name in the manifest first. The whole folder is on GitHub.