Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- os.loadAPI( "/load")
- local logo = {
- "7 7 7 7 77 3 3 3 ",
- "7 7 7 3 3 ",
- "777 777 777 777 77 7 777 7 777 777 7 333 3 333",
- "7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 3 3 3 3 ",
- "7 7 7 777 7 7 7 7 777 7 7 7 777 7 3 3 3 3 ",
- "7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 3 3 3 3 ",
- " 77 7 7 777 777 7 7 777 7 7 7 7 7 7 333 3 33",
- }
- local overall = load.init( load.STANDARD, logo, 10, 30, 13, colors.red, "Starting up...", "Load Screen Example", "By TheOriginalBIT" )
- local bar = load.init( load.BAR_ONLY, nil, 20, 30, 14, colors.yellow, nil, nil, nil )
- local function dooverallstuff()
- overall:setMessage( "Downloading...")
- for i = 1, 9 do
- sleep( 1 ) -- normally something would be done here, please for the love of ___ don't just sleep it, this api isn't designed for fake loading screens
- overall:triggerUpdate( "Downloading ("..( overall:getCurrentProgress() + 1 ).."/10)..." )
- end
- overall:triggerUpdate( "Done!" )
- end
- local function dobarstuff()
- for i = 1, 20 do
- sleep( 0.3 ) -- normally something would be done here, please for the love of ___ don't just sleep it, this api isn't designed for fake loading screens
- bar:triggerUpdate( )
- end
- end
- local function dooverall()
- overall:run( )
- end
- local function dobar()
- bar:run( )
- end
- parallel.waitForAll( dooverall, dobar, dooverallstuff, dobarstuff )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement