I released Daigoro_LuaUI_Minimal. It basically is a minimal version of a Lua UI package that i made a while ago. More in-depth examples will be added soon to the package.

This is package that allows creating local UI entirely in Lua.

Download the Daigoro_LuaUI_Minimal package and drop that script folder into your “User” template.


Showcase of screen UI that was entirely done with an early stage of this package:

Not the first patch, but the first patch notes (04.03.2022):

Patch Notes:

  Additional MouseEvent options:
    -- haha, beat that, gameface! (jk, i love you coherent labs)
    +event argument support
    --Lua event callbacks now receive event properties like clientX, clientY and a couple more (in form of a table as second parameter)
    +improved SVG passed into innerHTML.
    -- for the anti-image-upload fraction out there (anyone?)
    +cleans up all child elements on Lua side (since setting the innerHTML wipes these anyways in the widget)
    -- makes more sense than not
    +Added Input.ListenForButton(buttonName,callback)
    +Added Input.UnlistenForButton(buttonName,callback)

    +Added a small easing library (UI.easing[key](numberBetweenZeroAndOne))
    --  possible key examples: easeInOutSine, easeInOutQuad, easeInOutCubic (to be continued ..) 
    --  (.. here )easeInOutQuart, easeInOutQuint, easeInOutExpo, easeInOutCirc, easeInOutBack, easeInOutElastic, easeInOutBounce and some more
    -- also covering a few easeIn and easeOut ones
    +Added UI.tpairs(time,steps)
    -- Example usage:
    for time,progress in UI.tpairs(2,.5) do --(steps can be undefined, so the loop will run each frame for two seconds)
      print(time.." and "..progress)  
    -- output (the results will be a tiny bit off depending on the time a frame takes): 
    -- 0 and 0
    -- .5 and .25
    -- 1 and .5
    -- 1.5 and .75
    -- 2 and 1
  Removal of not optimal design decisions/"Bug fixes":
    +UI elements will not be garbage collected until bein Destroyed
    -- "your code is so bad that even lua garbage collects it" .. xD

    +Added the possibility to set the type of UI elements
    -- only available when spawning the div, not changable later. UI.New({type='span'}) will create an empty span as example.

Thanks to ephemerald for mentioning the lack of documentation/description. Will be added soon!