resonable changes

minor tweeks for qol and some bug fixes

Registering menus caused data to not be updated when retrieving new info/variables

func check was redundent

removed some prints

added scaleform run loop for qol
This commit is contained in:
gononono64 committed 2025-02-15 21:16:44 -06:00
1 parent 6e93ac2b47
commit 0212c21487
4 files changed
+44 -11

No files matched your search

+27 -1
View File
@@ -1,5 +1,6 @@
Scaleform = {}
local function SetupScaleform(scaleform, Buttons)
function SetupScaleform(scaleform, Buttons)
local scaleform = RequestScaleformMovie(scaleform)
local timeout = 5000
while not HasScaleformMovieLoaded(scaleform) and timeout > 0 do
@@ -46,8 +47,33 @@ function Scaleform.SetupInstructionalButtons(buttons)
-- {type = "SET_BACKGROUND_COLOUR"},
}
local scaleform = SetupScaleform("instructional_buttons", buttons)
return scaleform
end
local runningScaleform = nil
function Scaleform.Run(scaleform, onUpdate)
if runningScaleform then return end
runningScaleform = scaleform
CreateThread(function()
while runningScaleform do
DrawScaleformMovieFullscreen(scaleform, 255, 255, 255, 255, 0)
if onUpdate then
shouldQuit = onUpdate()
if shouldQuit then
Scaleform.Stop()
break
end
end
Wait(2)
end
end)
end
function Scaleform.Stop()
runningScaleform = nil
end
exports("Scaleform", Scaleform)
return Scaleform