Caught the notorious SimpleWindow crash

This commit is contained in:
2023-03-09 05:23:59 -07:00
parent 96597c47c8
commit 098f6721ed

View File

@@ -38,6 +38,7 @@
// UI key controls are still available. it also handles left and right. // UI key controls are still available. it also handles left and right.
:FlxKeyShortcutHandler<ShortcutAction> xHandler (new FlxKeyShortcutHandler)] :FlxKeyShortcutHandler<ShortcutAction> xHandler (new FlxKeyShortcutHandler)]
(assert FlxG.camera "SimpleWindow.new() must be called in or after create()")
(super 0 0) (super 0 0)
(when defaultCamera (set this.cameras [defaultCamera])) (when defaultCamera (set this.cameras [defaultCamera]))
(makeGraphic (makeGraphic
@@ -60,7 +61,7 @@
(when title (-= controlsPerColumn 1))) (when title (-= controlsPerColumn 1)))
(when title (when title
(set titleText (makeText title null))) (set titleText (makeText title titleColor)))
(set keyHandler.onBadKey ->:Void [key context] (set keyHandler.onBadKey ->:Void [key context]
(unless (= key xKey) (unless (= key xKey)