mirror of
https://github.com/CommunityOx/ox_lib.git
synced 2026-08-16 22: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
|
||||
|
||||
---@return nil
|
||||
function lib.scaleform:startDrawing()
|
||||
if self.private.isDrawing then
|
||||
return
|
||||
function lib.scaleform:isDrawing()
|
||||
return self.private.isDrawing
|
||||
end
|
||||
|
||||
self.private.isDrawing = true
|
||||
CreateThread(function()
|
||||
while self.private.isDrawing do
|
||||
function lib.scaleform:draw()
|
||||
if self.target then
|
||||
SetTextRenderId(self.target)
|
||||
SetScriptGfxDrawOrder(4)
|
||||
@@ -182,7 +178,18 @@ function lib.scaleform:startDrawing()
|
||||
if self.target then
|
||||
SetTextRenderId(1)
|
||||
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)
|
||||
end
|
||||
end)
|
||||
|
||||
Reference in New Issue
Block a user