Raylib.nelua follows original Raylib development cycle with additional features but nothing out of ordinary.
As Raylib updates roll out, Raylib.nelua will follow soon after. This binding does not shy away from implementing certain functions to make developers life easier, however. It will never implement new features that would otherwise not fit Raylib.
The current roadmap is:
Nothing at the moment. Important API have been covered.
- raylib.h
- raymath.h
- easings.h
- raygui.h
- rlgl.h
None as of yet.
Notes
Due to a little tricky Raygui API and how it returns and requests ints and expect them to be also booleans for certain functions, I've added a helper function
rlgui.getStyleAsBool
(which returns boolean instead of integer whichrlgui.getStyle
does),rlgui.boolToInt
andrlgui.intToBool
(self-explanatory what it does). On certain occasions, as seen in the examplescroll_panel
:
-- scrollBarArrows is of type boolean which rlgui.getStyleAsBool returns, unlike its sister function rlgui.getStyle that returns a cint/int32
local scrollBarArrows = rlgui.getStyleAsBool(rlgui.control.SCROLLBAR, rlgui.scrollBarProperty.ARROWS_VISIBLE)
-- rlgui.checkBox's 3rd parameter requests a pointer to a boolean which is our scrollBarArrow.
-- This is where we're unable to simply use rlgui.getStyle() as it returns an int. My knowledge here is limited on how we could convert an integer to a pointer of boolean in Nelua.
rlgui.checkBox(rl.rectangle{ 565, 280, 20, 20 }, "ARROWS_VISIBLE", &scrollBarArrows)
-- However, now rlgui.setStyle's third parameter requests an integer value. This is easy to provide as we can use the helper function
-- rlgui.boolToInt() that convers our boolean to an integer (not a pointer!)
rlgui.setStyle(rlgui.control.SCROLLBAR, rlgui.scrollBarProperty.ARROWS_VISIBLE, rlgui.boolToInt(scrollBarArrows)) -- Pass scrollBarArrows as convered bool to integer.
Going forward
Until I manage to find an easier or more intuitive way to have
rlgui.getStyle
either return bool or int, this will have to be way forward. I recommend checking out other examples to understand how Raygui binding works in Nelua.