Hollywoo loading screen/allow threaded loading
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
"dependencies": {
|
||||
"kiss": "",
|
||||
"kiss-flixel": "",
|
||||
"flixel-addons": "",
|
||||
"hollywoo": ""
|
||||
},
|
||||
"url": "https://github.com/NQNStudios/kisslang",
|
||||
|
@@ -102,13 +102,16 @@
|
||||
(SpriteTools.writeOnSprite subtitle SUBTITLES_SIZE titleCard (object x (Percent 0.5) y (Pixels subtitleY)))
|
||||
(+= subtitleY SUBTITLES_SIZE SUBTITLES_MARGIN))
|
||||
(FlxG.state.add titleCard)
|
||||
// Allow skipping
|
||||
(startWaitForInput cc))
|
||||
(cc))
|
||||
|
||||
(method :Void doLoading [:Void->Void _load :Continuation cc]
|
||||
(let [loop (new flixel.addons.util.FlxAsyncLoop 1 ->:Void {(_load)(cc)})]
|
||||
(haxe.Timer.delay ->:Void (loop.start) 1)
|
||||
(FlxG.state.add loop)))
|
||||
|
||||
(method :Void hideTitleCard []
|
||||
(FlxG.state.remove titleCard))
|
||||
|
||||
|
||||
// TODO these could be customizable to the Actor, wrylies, etc.
|
||||
(var DIALOG_BOX_COLOR FlxColor.BLACK)
|
||||
(var DIALOG_COLOR FlxColor.WHITE)
|
||||
|
Reference in New Issue
Block a user