Modules
Dui
Javascript
Client

Cliente

Criação simples e centralizada de DUIs, suportando envio de mensagens, alteração de URL e remoção.

Dui(data)
  • data: object
    • url: string
    • width: number
    • height: number
    • debug?: boolean

Retorna:

  • dui: Dui
    • url: string
    • duiObject: number
    • duiHandle: string
    • runtimeTxd: number
    • txdObject: number
    • dictName: string
    • txtName: string
    • setUrl: function(url: string)
    • sendMessage: function(data: object)
    • remove: function

Exemplo de Uso

import { Dui, cache } from '@overextended/ox_lib/client'
 
const dui = new Dui({
    url: `nui://${cache.resource}/web/index.html`,
    width: 1920,
    height: 1080,
    debug: true
})
 
// Alterar URL
dui.setUrl("https://google.com")
 
// Enviar uma mensagem
dui.sendMessage({
    action: "display",
    value: true
})
 
// Remover
dui.remove()