unique title card FlxSprite

This commit is contained in:
2021-12-30 14:32:53 -07:00
parent 22b857880f
commit 4ad244eb76
2 changed files with 2 additions and 3 deletions

View File

@@ -72,7 +72,7 @@
(prop &mut :FlxSprite titleCard null) (prop &mut :FlxSprite titleCard null)
(method :Void showTitleCard [:Array<String> text :Continuation cc] (method :Void showTitleCard [:Array<String> text :Continuation cc]
(set titleCard (new FlxSprite)) (set titleCard (new FlxSprite))
(titleCard.makeGraphic 1280 720 FlxColor.BLACK) (titleCard.makeGraphic 1280 720 FlxColor.BLACK true)
(SpriteTools.writeOnSprite (text.shift) TITLE_SIZE titleCard (object x (Percent 0.5) y (Pixels TITLE_Y))) (SpriteTools.writeOnSprite (text.shift) TITLE_SIZE titleCard (object x (Percent 0.5) y (Pixels TITLE_Y)))
(localVar &mut subtitleY (+ TITLE_Y TITLE_SIZE TITLE_MARGIN)) (localVar &mut subtitleY (+ TITLE_Y TITLE_SIZE TITLE_MARGIN))
(doFor subtitle text (doFor subtitle text

View File

@@ -234,12 +234,11 @@
(cc)) (cc))
(hollywooMethod timedTitleCard true [time :Array<String> lines :Continuation cc] (hollywooMethod timedTitleCard true [time :Array<String> lines :Continuation cc]
// TODO allow skipping it
(let [cc ->{(director.hideTitleCard)(cc)}] (let [cc ->{(director.hideTitleCard)(cc)}]
(director.showTitleCard lines cc) (director.showTitleCard lines cc)
(delay time cc))) (delay time cc)))
// TODO themed titleCard // TODO themed titleCard (wait for song or sound)
// TODO timed superText // TODO timed superText
// TODO themed superText // TODO themed superText