Skip to content

uiform register legacy

Peter Lewis edited this page Aug 11, 2020 · 3 revisions

uiform-register-legacy registers a new display element using legacy syntax, which is compatible with the function calls used in all modules/ln_glgui widgets.

Parameter Description
name Display element name
draw Function called when element is drawn: (lambda (gui wgt) ...)
input Function called when element is clicked: (lambda (gui wgt type mx my) ... )

Example

Example 1: Reuse the (glgui-box g x y w h c) widget as a uiform element, and call it. Note that the color argument is NOT optional in this case and will cause a segfault if omitted.

(uiform-register-legacy 'box glgui:box-draw glgui:box-input)
(box color ,Red)
Clone this wiki locally