📃Emote UI / Radial Menu

Config

if you want to handle TAB button for showing up emote UI. You can set useEmoteButton to true from conf.lua

UI Data

local data = {
        menuTitle = "Title",
        menuSubTitle = "Subtitle",
        menuDescription = "Description",
        info_text = "info_text",
        emotes = { -- you can set max. 4 emote for one menu. You can create subMenu
            ["1"] = {
                main_dictionary = "multiwheel_emotes", -- texture dictionary
                main_image = "emote_action_air_banjo_1", -- texture image
                closeAfterClick = true, -- If you want it to close when you click on the emote, set it to "True".
                --callback = function(self)
                --    print("callback 1")
                --end,
                -- or 
                subMenu = { -- sub menu data
                    menuTitle = "Title 2", -- sub menu title
                    menuSubTitle = "Subtitle 2",
                    menuDescription = "Description 2",
                    info_text = "info_text 2",
                    ["1"] = { -- sub menu firt emote
                        main_dictionary = "hud_toasts",
                        main_image = "toast_horse_bond",
                        closeAfterClick = true,
                        --callback = function(self)
                        --    print("callback sub 1")
                        --end,
                        subMenu = { -- sub - sub menu
                            ["1"] = { -- sub - sub first emote
                                main_dictionary = "hud_toasts",
                                main_image = "toast_mp_status_change",
                                closeAfterClick = true,
                                callback = function(self)
                                    print("callback sub sub 1")
                                end,
                                name = "sub 1-1",
                                iName = "sub 1-2",
                                iVis = true,
                                eCount = "sub 1-3",
                                eCVis = true,
                            }
                        },
                        name = "sub 1",
                        iName = "sub 2",
                        iVis = true,
                        eCount = "sub 3",
                        eCVis = true,
                    }
                },
                name = "main menu emote 1",
                iName = "main menu emote 1 sub title",
                iVis = true,
                eCount = "main menÄą emote 1 desc.",
                eCVis = true,
            },
            ["2"] = {
                main_dictionary = "hud_textures",
                main_image = "bank_debt",
                closeAfterClick = true,
                callback = function(self) -- The function that will be activated when the button is clicked.
                    print("callback 2")
                end,
                name = "main menu emote 2",
                iName = "main menu emote 2 sub title",
                iVis = true,
                eCount = "main menÄą emote 2 desc.",
                eCVis = true,
            },
            ["3"] = {
                main_dictionary = "hud_toasts",
                main_image = "toast_mp_ability_deadeye",
                closeAfterClick = true,
                callback = function(self)
                    print("callback 3")
                end,
                name = "main menu emote 3",
                iName = "main menu emote 3 sub title",
                iVis = true,
                eCount = "main menÄą emote 3 desc.",
                eCVis = true,
            },
            ["4"] = {
                main_dictionary = "hud_toasts",
                main_image = "toast_mp_ability_recovery",
                closeAfterClick = true,
                callback = function(self)
                    print("callback 4")
                end,
                name = "main menu emote 4",
                iName = "main menu emote 4 sub title",
                iVis = true,
                eCount = "main menÄą emote 4 desc.",
                eCVis = true,
            }
        }
    }

Usable Functions

local emoteData = exports["qadr_ui"]:createEmoteUI(data)

emoteData.clearCenteralData() -- Delete menuTitle, menuSubTitle, menuDescription
emoteData.showUI() -- Show emote ui
emoteData.returnMainMenu() -- return to previous menu / same back button
emoteData.hideUI() -- hide ui
emoteData.clearUIData() -- clear ui with all data
local emoteUi = exports["qadr_ui"]:getCurrentEmoteUI()
                            -- this return current emote ui or nil
                            
emoteUi.clearCenteralData() -- Delete menuTitle, menuSubTitle, menuDescription
emoteUi.showUI()            -- Show emote ui
emoteUi.returnMainMenu()    -- return to previous menu / same back button
emoteUi.hideUI()            -- hide ui
emoteUi.clearUIData()       -- clear ui with all data

Videos

Example

RegisterCommand("emoteUI",function()
    local data = {
        menuTitle = "Title",
        menuSubTitle = "Subtitle",
        menuDescription = "Description",
        info_text = "info_text",
        emotes = {
            ["1"] = {
                main_dictionary = "multiwheel_emotes",
                main_image = "emote_action_air_banjo_1",
                closeAfterClick = true,
                --callback = function(self)
                --    print("callback 1")
                --end,
                -- or 
                subMenu = {
                    menuTitle = "Title 2",
                    menuSubTitle = "Subtitle 2",
                    menuDescription = "Description 2",
                    info_text = "info_text 2",
                    ["1"] = {
                        main_dictionary = "hud_toasts",
                        main_image = "toast_horse_bond",
                        closeAfterClick = true,
                        --callback = function(self)
                        --    print("callback sub 1")
                        --end,
                        subMenu = {
                            ["1"] = {
                                main_dictionary = "hud_toasts",
                                main_image = "toast_mp_status_change",
                                closeAfterClick = true,
                                callback = function(self)
                                    print("callback sub sub 1")
                                end,
                                name = "sub 1-1",
                                iName = "sub 1-2",
                                iVis = true,
                                eCount = "sub 1-3",
                                eCVis = true,
                            }
                        },
                        name = "sub 1",
                        iName = "sub 2",
                        iVis = true,
                        eCount = "sub 3",
                        eCVis = true,
                    }
                },
                name = "1",
                iName = "2",
                iVis = true,
                eCount = "3",
                eCVis = true,
            },
            ["2"] = {
                main_dictionary = "hud_textures",
                main_image = "bank_debt",
                closeAfterClick = true,
                callback = function(self)
                    print("callback 2")
                end,
                name = "4",
                iName = "5",
                iVis = true,
                eCount = "6",
                eCVis = true,
            },
            ["3"] = {
                main_dictionary = "hud_toasts",
                main_image = "toast_mp_ability_deadeye",
                closeAfterClick = true,
                callback = function(self)
                    print("callback 3")
                end,
                name = "7",
                iName = "8",
                iVis = true,
                eCount = "9",
                eCVis = true,
            },
            ["4"] = {
                main_dictionary = "hud_toasts",
                main_image = "toast_mp_ability_recovery",
                closeAfterClick = true,
                callback = function(self)
                    print("callback 4")
                end,
                name = "10",
                iName = "11",
                iVis = true,
                eCount = "12",
                eCVis = true,
            }
        }
    }
    local emoteUI = exports["qadr_ui"]:createEmoteUI(data)
    emoteUi.showUI()
end)

Last updated