ZSX Development
  • Homepage to Innovation
  • User Interface V2
    • Installation
      • Introduce
      • Integration for Chat
      • ZSX_Multicharacter Integration
      • Auto Installer
        • About
        • Overextended Library
    • Exports
      • Interfaces
        • Default Notifications
        • Help Notification
        • Notifications
        • Progress Bar
        • TextUI
          • Updating text & key
        • Point
        • Chat
          • AddMessage
          • AddUserMessage
        • 3D DUI
      • Storage
        • Gathering Storage
          • Get Color
          • Get Type
          • Get Options
          • Is Configuration Done
        • Get Current Screen
        • Is UI Busy
        • Gathering position of the interface
      • Threads
        • Interrupting Thread
      • Other
        • DisplayRadar
        • OpenConfiguration
        • OpenMainMenu
        • OpenSettings
        • IsPauseMenuActive
        • IsUIBusy
        • GetCurrentScreen
        • Cinematic
    • Configurating
      • Handling UI
        • Show / Hide UI
        • Disabling Interfaces
        • Disabling Interfaces type
        • Disabling configuration for Interface
        • Creating new status for HUD
        • Changing links
        • Custom Pause Menu Navbar
        • Removing Pause Menu user data
        • Adjusting new voice states
        • Changing between voice indicators
        • Adding new blacklisted weapon
        • Adding blacklist for vehicle model
        • Changing currency
      • Commands
        • Adding commands
      • Translating
        • Translating the resource
        • Adding translation to custom weapons
        • Translating component's type label
      • Handling Data
        • Adding more accounts to Displayers
        • Adding addon elements to Displayers
        • Creating job2 functionality
        • Changing default keybinds
      • AIO Options
      • Camera stuff
        • Creating new preset for Cinematic Mode
        • Creating new scenes for Main Menu
    • Snippets
      • ESX
        • Notification
        • TextUI
        • ShowAdvancedNotification
        • ShowHelpNotification
      • QBCore
        • Notification
        • ProgressBar
  • Multicharacter
    • Installation
      • Setting up the Appearance
      • Setting up the logo
      • Setting up table removal
    • Exports
      • Client
        • GetConfigValue
        • GetUserStorage
        • Logout
        • SetLocationsDisabled
        • isInMulticharacter
        • Initialize
      • Server
        • isInMulticharacter
        • Logout
    • Workers
    • Baseevents
    • FAQ
    • Translating the resource
    • Open source files
    • Common Issues
      • Common
      • ESX
      • Database
      • Other
  • User Interface
    • About
    • Notifications
    • Progressbar
    • Custom Initialization
    • Functions
  • Dealership
    • About
    • Installation
    • Adding a Store
    • Using Exclusive Content
    • Listeners
    • Configuration
Powered by GitBook
On this page
  • Adding
  • Path object explained
  • Export object explained
  • Examples
  • Export
  • Event
  1. User Interface V2
  2. Configurating
  3. Handling UI

Custom Pause Menu Navbar

Adding

Head over to /shared/ui_cfg/config_pausemenu.lua file and find:

Config.PauseMenu.Buttons = {
    ['ui'] = {
        name = 'ui',
        path = {
            type = 'UISettings',
        },
        icon = 'UI',
    },
    ['settings'] = {
        name = 'settings',
        path = {
            type = 'game',
            value = 'settings',
        },
        icon = 'fas fa-cog',
    },
    ['map'] = {
        name = 'map',
        path = {
            type = 'game',
            value = 'map',
        },
        icon = 'fas fa-map',
    },
}

In that example, we will add Logout action for our Multicharacter.

['logout'] = { -- Unique key
    name = 'logout', -- Unique name as the key
    path = {
        type = 'custom_payload', -- Do not change that!
        export = {
            resource = 'ZSX_Multicharacter',
            exportFunction = 'Logout',
            params = {}
        },
    },
    icon = 'fas fa-times',
},

Path object explained

Path is the object that determines payload which will be executed after user interaction.

key
Information

type

This should always be 'custom_payload'

export

Object revised beneath

icon

Export object explained

There's 2 options to use it properly. There's an export object which obviously is only client-sided. You can use it for any kind of interaction you'd like to. Other is event, which needs to be determined whether it's client sided or server sided. Also, take a note that you can parse params, but there's a catch. Do not use it as an object since we unpack the table!

Export object

key
Information

resource

Determines parent resource of the selected export

exportFunction

Exported function name

params

Arguments of the function

Event object

key
Information

type

Determines if it's client or server side event

name

Registered event name

params

Arguments of the event

Examples

Export

['logout'] = { -- Unique key
    name = 'logout', -- Unique name as the key
    path = {
        type = 'custom_payload', -- Do not change that!
        export = {
            resource = 'ZSX_Multicharacter',
            exportFunction = 'Logout',
            params = {}
        },
    },
    icon = 'fas fa-times',
},

Event

['logout'] = { -- Unique key
    name = 'logout', -- Unique name as the key
    path = {
        type = 'custom_payload', -- Do not change that!
        event = {
            type = 'client',
            name = 'ZSX_Multicharacter:Event:Logout',
            params = {},
        },
    },
    icon = 'fas fa-times',
},
PreviousChanging linksNextRemoving Pause Menu user data

Last updated 5 months ago

Icon List available .

here