SubmitFrame
Publish the current build buffer as the active frame to render on the Overlay.
Syntax
Susano.SubmitFrame() -> void
Parameters
None
Return(s)
None
Behavior
Flags the current build buffer as ready.
Next Overlay swaps to this buffer and starts displaying it.
Stays visible on the Overlay until the next Susano.SubmitFrame().
Does not clear the displayed frame; it replaces it on swap.
Non-blocking.
Example(s)
-- One-shot overlay: persists until another Submit
Susano.BeginFrame()
Susano.DrawLine(100,100, 300,200, 1,0,0,1, 2)
Susano.DrawText(110,90, "Overlay", 18, 1,1,1,1)
Susano.SubmitFrame()
-- Per-frame update
Citizen.CreateThread(function()
while true do
local t = GetGameTimer() / 1000.0
Susano.BeginFrame()
Susano.DrawText(20, 20, ("t=%.2f"):format(t), 18, 1,1,1,1)
Susano.SubmitFrame()
Citizen.Wait(0)
end
end)