Got bored earlier this week and converted NativeUI to Lua plus i haven’t released anything in a while…
NativeUI in LUA for FiveM.
Original: GitHub - Guad/NativeUI: UI library for Grand Theft Auto V
Include client_script '@NativeUI/NativeUI.lua' in your __resource.lua to use
Creation Functions
NativeUI.CreatePool() used to handle all your menus
NativeUI.CreateMenu(Title, Subtitle, X, Y, TxtDictionary, TxtName) create a UIMenu
NativeUI.CreateItem(Text, Description) create a UIMenuItem
NativeUI.CreateColouredItem(Text, Description, MainColour, HighlightColour) create a UIMenuColouredItem
NativeUI.CreateCheckboxItem(Text, Check, Description) create a UIMenuCheckboxItem
NativeUI.CreateListItem(Text, Items, Index, Description) create a UIMenuListItem
NativeUI.CreateSliderItem(Text, Items, Index, Description, Divider) create a UIMenuSliderItem
NativeUI.CreateSprite(TxtDictionary, TxtName, X, Y, Width, Height, Heading, R, G, B, A) create a Sprite
NativeUI.CreateRectangle(X, Y, Width, Height, R, G, B, A) create a Rectangle
NativeUI.CreateText(Text, X, Y, Scale, R, G, B, A, Font, Alignment, DropShadow, Outline, WordWrap) create Text
Window(s)
Used with UIMenu with functions :AddWindow(Window) and :RemoveWindowAt(Index)
NativeUI.CreateHeritageWindow(Mum, Dad)
Panel(s)
Currently only can be used with UIMenuListItem with functions :AddPanel(Panel) and :RemovePanelAt(Index)
NativeUI.CreateGridPanel(TopText, LeftText, RightText, BottomText)
NativeUI.CreateColourPanel(Title, Colours)
NativeUI.CreatePercentagePanel(MinText, MaxText)
Screenshot
Original Example menu

Panels
Grid Panel

Colour Panel

Percentage Panel

Windows
Heritage Window

Additions
While converting it i also added mouse clicking function on the list item arrows and the slider arrows and i also added my slider item which i created for the C# version
In version 2.0.0 i added in Windows and Panels
Issue(s)
The only issue i have come across is the description/string measuring to be wonky compared to the original, if anyone finds the problem let me know!





