Skip to content

Luanti mod for creating formspecs using relative positioning like Android's Constraint Layout

License

Notifications You must be signed in to change notification settings

ZenonSeth/respec

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

111 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Respec

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

Getting Started page on the Github Wiki

API

The API docs can read online here.
Use the 'Outline' button in the top right to see table of content.

Download

Download from ContentDB or see latest releases

Specifically Unsupported Formspec Elements

  • real_coordinates[<bool>]
    Reason: This is set to true by 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 regular field[] elements and all their functionalities are fully supported.

About

Luanti mod for creating formspecs using relative positioning like Android's Constraint Layout

Resources

License

Stars

Watchers

Forks

Languages