superText fall through to old look when multiline needed

This commit is contained in:
2023-05-26 17:08:28 -06:00
parent 3a24189de4
commit e06269073a

View File

@@ -369,13 +369,16 @@
(localVar &mut :Float speakerNameX -1)
(case type
(Super
(when superText (FlxG.state.remove superText))
(set superText (SpriteTools.textPlate text DIALOG_SIZE SUPER_MARGIN))
(set superText.cameras [flxMovie.uiCamera])
(superText.screenCenter)
(set superText.y flxMovie.DIALOG_Y)
(FlxG.state.add superText)
(startWaitForInput cc)
(return))
// If supertext can be done in a single centered line, do so
(when (<= superText.width FlxG.width)
(set superText.cameras [flxMovie.uiCamera])
(superText.screenCenter)
(set superText.y flxMovie.DIALOG_Y)
(FlxG.state.add superText)
(startWaitForInput cc)
(return)))
((OnScreen character)
(set speakerNameX (+ character.actor.x (fHalf character.actor.width)))
// When an actor is associated with the line, check for an animation matching the wryly