LV Soft FiveM
  • LV SOFT
    • 👋Welcome!
    • 🛒Tebex
    • 💬Discord
  • QB/ESX
    • ☮️lvs-loading
      • Installation
      • Configuration
    • 👫lvs-multichar
      • Installation
      • Configuration
      • Adding Scenes
      • Tebex Integration
      • Commands
    • 🗺️lvs-spawnselector
      • Installation
      • Configuration
    • 🥼lvs-clothing
      • Installation
        • QBCore Install
        • ESX Install
      • Configuration
      • Migration
        • qb-clothing
        • esx-skinchanger
        • Illenium-Appareance
      • Blacklisting
      • Events
      • Commands
    • ⚙️lvs-lib
      • black-screen loading
      • notifications
      • progressbar
      • key-interaction
      • textui
      • alert
      • context menu
      • context input
    • 💬lvs-chat
      • Installation
      • Configuration
      • Events & Exports
    • 📱lvs-radio
      • Installation
      • Configuration
      • Events & Exports
    • 🗃️lvs-playerlist
      • Installation
      • Configuration
    • 📹lvs_weazelnews
      • Installation
      • Configuration
    • 🎒lvs-inventory
      • Installation
      • Configuration
      • lvs-inventory
        • exports
      • lvs-shops
        • Configuration
        • Exports
      • lvs-crafting
    • 🪪lvs-idmanager
      • Installation
      • Configuration
      • Exports
  • Standalone
    • 🚘lvs-drift
      • Installation
      • Configuration
      • Commands
    • 🕺lvs-animations
      • Installation
      • Configuration
      • Adding Animations
      • Exports/Events
    • 💥lvs-accident
      • Installation
      • Configuration
    • 🔥lvs-explosion
      • Installation
      • Configuration
    • 🏎️lvs-racing
  • ESX
    • 📅Soon
Powered by GitBook
On this page
  • Text UI
  • How to use:
  • QBCore Integration:
  1. QB/ESX
  2. lvs-lib

textui

Previouskey-interactionNextalert

Last updated 10 months ago

Text UI


How to use:

Client side using exports

Example:

-- show up the textui
exports.lvs_lib:showTextUI(text, key)

-- update the text and key on the visible textui
exports.lvs_lib:updateTextUI(text, key)

-- show up the text on the screen
exports.lvs_lib:pressedTextUI()

-- the the textui
exports.lvs_lib:hideTextUI()

QBCore Integration:

Replace entire qb-core/client/drawtext.lua with:

local function drawText(text, position)
    exports.lvs_lib:showTextUI(text)
end

local function changeText(text, position)
    exports.lvs_lib:updateTextUI(text)
end

local function keyPressed()
    exports.lvs_lib:pressedTextUI()
end

local function hideText()
    exports.lvs_lib:hideTextUI()
end

RegisterNetEvent('qb-core:client:DrawText', function(text, position)
    drawText(text, position)
end)

RegisterNetEvent('qb-core:client:ChangeText', function(text, position)
    changeText(text, position)
end)

RegisterNetEvent('qb-core:client:HideText', function()
    hideText()
end)

RegisterNetEvent('qb-core:client:KeyPressed', function()
    keyPressed()
end)

exports('DrawText', drawText)
exports('ChangeText', changeText)
exports('HideText', hideText)
exports('KeyPressed', keyPressed)
⚙️