FiveM CoraUI LUA Version

FiveM-CoraUI

Library written in typescript to create menus on FiveM
Support LUA version

Link : GitHub - hoyame/FiveM-CoraUI at lua

Example

RegisterCommand('testMenu', function() 
    exports.coraui:CreateMenu({
        name = 'Feff',
        subtitle = 'Principal',
        glare = true,
        buttons = {
            { name = "Submenu uruspu", onClick = function()
                exports.coraui:CreateSubmenu("uruspu")
            end},

            { name = "Submenu sujuc", onClick = function()
                exports.coraui:CreateSubmenu("sujuc")
            end},

            { name = "Checkbox", checkbox = function(bool)
                print(bool)
            end},

            { name = "Rightlabel", rightText = "~g~260 000 $", onClick = function()

            end},

            { name = "Slider", onSlide = function(z)
                print("Button clicked  " .. z)
            end, slider = {"ananasikim", "sikimiyalla", "sitch"}},

            { name = "Close", onClick = function()
                exports.coraui:CloseMenu()
            end}
        },

        submenus = {
            ["uruspu"] = {
                name = "uruspu",
                subtitle = 'Secondaire 1',
                glare = true,
                buttons = {
                    { name = "uruspu1" },
                    { name = "uruspu2" }
                }
            },

            ["sujuc"] = {
                name = "sujuc",
                subtitle = 'Secondaire 2',
                glare = true,
                buttons = {
                    { name = "sujuc1" },
                    { name = "sujuc2" }
                }
            }
        }
    }) 
end)

Requirements

  • coraui (not rename/delete)
2 Likes

What about resmon?

my eyes, my love for low resmon, ur hurting it! :cry:

anyway having a low resmon is not essential, especially that 0.32ms only during the opening, I do not know if there is a way to use DrawRect without consuming CPU :confused:

no, better decision is going with HTML / JS / CSS

1 Like

It is difficult to create something beautiful that fits all server styles in html/css, I had already tried but it did not result in something beautiful

you would like a nice menu in html/css ?

because if you are many to ask, I pay a ui designer and I make the library and I publish it :slight_smile:

Well, to be honest I think there is nothing else fitting to FiveM than making the UI in HTML - I guess no server will be needing a UI in pure LUA because it just makes it unplayable taking in consideration all the other resources that are already not optimized.

IF you can comeup with something new, something that is better than the ox_lib or ESX_MENU_DEFUALT / DIALOG / LIST (maybe also easier to use) then go for it. But just think of all the others alternative - it would’nt be useful if you make something there already exists.
Cheers!