DirkScripts
Docs
DUI
βΉοΈ Client Module - This can only be used on the client
#lib.dui
Create a DUI browser instance that renders a web page onto a runtime texture.
lualocal dui = lib.dui({ url = 'https://example.com', width = 512, height = 512, txn = 'my_texture', txd = 'my_texture_dict', })
#Options
| Field | Type | Required | Description |
|---|---|---|---|
url | string | yes | URL to render |
width | number | yes | Texture width in pixels |
height | number | yes | Texture height in pixels |
txn | string | yes | Runtime texture name |
txd | string | yes | Runtime texture dictionary |
#Methods
luadui:setUrl(url) -- Navigate to a new URL dui:sendMessage(data) -- Send a table as JSON to the page dui:sendMouseMove(x, y) -- Simulate mouse movement dui:sendMouseDown(button) -- Simulate mouse button press dui:sendMouseUp(button) -- Simulate mouse button release dui:sendMouseWheel(deltaX, deltaY) -- Simulate scroll dui:remove() -- Destroy the DUI instance
