Releases: Sasszem/yalg
Simple mobile fix
Remove globals
Removed the previous pollution of the global namespace.
WARNING! THIS CAN BREAK COMPATIBILITY!
Now instead of
require("yalg")
local G = GUI(VDiv(...
You do like this:
local Y = require("yalg")
local G = Y.GUI(Y.VDiv(...
To update, you should look for:
GUI
VDiv
andHDiv
Button
andLabel
Switcher
Font
andrgb
There's an easy convenience fix for kind-of backward-compatibility:
require("yalg").import()
local G = GUI(VDiv(...
This simply copies into the global namespace, which is NOT recommended, and only there for backwards compatibility!
Also added a "nice" build script to automate copying the files into one. It's ugly af, but works...
Quick fixes from Crossfire
While using this, I found a bug an a possible improvement
Font loading was broken, custom fonts would actually crash the lib (and your game).
I changed the way of building widget discovery trees (for .widget
) so they can be used on any container after it was created, but before it was added to the parent. It makes it possible to break up your GUI into separate files and register the event handlers there.
Got bored on it
Version 1.0 has all the features I planned and some others because I can not keep myself from overengineering stuff.
I am still open for issue reports & maybe even for improvement ideas.
Check out the tutorial!
I attached a single file where I compiled all the different modules into, so they can just be dropped in an existing project.