drawDui
Client
Draws a dui on the screen for one frame, in coordinates relative to the screen.
bool drawDui(dui dui, float x, float y, float width, float height)
Parameters
| Name | Type | Description |
|---|---|---|
| dui | dui | The dui. |
| x | float | Left edge, from 0 to 1 of the screen's width. |
| y | float | Top edge, from 0 to 1 of the screen's height. |
| width | float | Width, as a fraction of the screen's width. |
| height | float | Height, as a fraction of the screen's height. |
Returns
true once the drawing is asked for. false with a wrong argument (logs a warning).
Call it every frame while the dui should show. To draw in pixels, use dxDrawImage with the dui.
Example
local dui = createDui("https://example.com", 1280, 720)
addEventHandler("onClientRender", root, function()
drawDui(dui, 0.7, 0.05, 0.25, 0.25)
end)