mirror of
https://github.com/CommunityOx/ox_lib.git
synced 2026-08-18 23:46:03 +01:00
fix(scaleform): invalid private property access
Adds an isDrawing and draw method to scaleforms. So technically a feature I guess.
This commit is contained in:
@@ -153,15 +153,11 @@ function lib.scaleform:setRenderTarget(name, model)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
---@return nil
|
function lib.scaleform:isDrawing()
|
||||||
function lib.scaleform:startDrawing()
|
return self.private.isDrawing
|
||||||
if self.private.isDrawing then
|
end
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
self.private.isDrawing = true
|
function lib.scaleform:draw()
|
||||||
CreateThread(function()
|
|
||||||
while self.private.isDrawing do
|
|
||||||
if self.target then
|
if self.target then
|
||||||
SetTextRenderId(self.target)
|
SetTextRenderId(self.target)
|
||||||
SetScriptGfxDrawOrder(4)
|
SetScriptGfxDrawOrder(4)
|
||||||
@@ -182,7 +178,18 @@ function lib.scaleform:startDrawing()
|
|||||||
if self.target then
|
if self.target then
|
||||||
SetTextRenderId(1)
|
SetTextRenderId(1)
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function lib.scaleform:startDrawing()
|
||||||
|
if self.private.isDrawing then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
self.private.isDrawing = true
|
||||||
|
|
||||||
|
CreateThread(function()
|
||||||
|
while self:isDrawing() do
|
||||||
|
self:draw()
|
||||||
Wait(0)
|
Wait(0)
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
|
|||||||
Reference in New Issue
Block a user