Respec, from "Relative Formspec", is a formspec library for Luanti.
Respec supports all features of the Luanti Formspec API past formspec version 2, with two trivial exceptions.
Respec provides:
- Easy and versatile method of positioning and sizing of elements
- Auto-sizing for some text elements
- Easy callbacks for interactive elements
- Quality-of-life features to decrease how much code has to be written
Respec's system of positioning and sizing of elements uses relative positioning, which is inspired by and strongly based on Android's Constraint Layout, with which Respec shares many similarities (e.g. chains).
However knowledge of Android or Constraint Layout is not required.
Getting Started page on the Github Wiki
The API docs can read online here.
Use the 'Outline' button in the top right to see table of content.
Download from ContentDB or see latest releases
-
real_coordinates[<bool>]
Reason: This is set totrueby default past formspec v2, and Respec's layout algorithm is build with the assumption that this is always enabled. There is also no functional difference in what can be achieved with formspecs by not supporting this element, so Respec assumes real coordinates are always on, and turning them off is not supported. -
Size-less
field[]
Reason: This element only has an edge-case usage for trivial forms that don't require any laying out of elements.
Note that regularfield[]elements and all their functionalities are fully supported.