Daigoro_LuaUI_Minimal

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.

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

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

Documentation:
https://daigoro96.github.io/API-Documentation-LuaUI/

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:
    +wheel
    +trigger
    +triggerdown
    +triggerup
    -- haha, beat that, gameface! (jk, i love you coherent labs)
  
  Events:  
    +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)
  SVG:
    +improved SVG passed into innerHTML.
    -- for the anti-image-upload fraction out there (anyone?)
  InnerHTML:
    +cleans up all child elements on Lua side (since setting the innerHTML wipes these anyways in the widget)
    -- makes more sense than not
  Input:
    +Added Input.ListenForButton(buttonName,callback)
    +Added Input.UnlistenForButton(buttonName,callback)

  Easing:
    +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
  tpairs:
    +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)  
    end
    -- 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

  type:
    +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!

4 Likes