# 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

```lua
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

```lua
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
```

```lua
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

{% embed url="<https://www.youtube.com/watch?v=2_JDgolM140>" %}

{% embed url="<https://www.youtube.com/watch?v=eJ8VjjZbktY>" %}

## Example

```lua
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)
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://abdulkadir-aktas.gitbook.io/qadr_docs/qadr_ui/emote-ui-radial-menu.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
