From 50f02e784af811dd51be76dbd74fef7e74de77e1 Mon Sep 17 00:00:00 2001 From: Nat Quayle Nelson Date: Wed, 30 Jul 2025 15:32:11 -0500 Subject: [PATCH] fix method calls to kiss-flixel --- src/hollywoo_flixel/FlxDirector.hx | 396 ++++++++++----------- src/hollywoo_flixel/FlxDirector.kiss | 74 ++-- src/hollywoo_flixel/HollywooFlixelDSL.kiss | 6 +- 3 files changed, 237 insertions(+), 239 deletions(-) diff --git a/src/hollywoo_flixel/FlxDirector.hx b/src/hollywoo_flixel/FlxDirector.hx index 2a08bce..5e88845 100644 --- a/src/hollywoo_flixel/FlxDirector.hx +++ b/src/hollywoo_flixel/FlxDirector.hx @@ -70,14 +70,14 @@ class FlxDirector implements Director; public static function get_lastSceneLabels():Map return { if (Prelude.truthy({ - final _p6LrZAnE338fNht4xCNZ6S:Dynamic = sys.FileSystem.exists(".FlxDirector.json"); + final _6W7oc3M6xwrzSHgtjRALx:Dynamic = sys.FileSystem.exists(".FlxDirector.json"); { - if (Prelude.truthy(_p6LrZAnE338fNht4xCNZ6S)) { - final _nLRjC9dmQsBTGRMN3fCofZ:Dynamic = !Prelude.truthy(sys.FileSystem.isDirectory(".FlxDirector.json")); + if (Prelude.truthy(_6W7oc3M6xwrzSHgtjRALx)) { + final _paW4tq9PLe9Wnrm8TQejiF:Dynamic = !Prelude.truthy(sys.FileSystem.isDirectory(".FlxDirector.json")); { - _nLRjC9dmQsBTGRMN3fCofZ; + _paW4tq9PLe9Wnrm8TQejiF; }; - } else _p6LrZAnE338fNht4xCNZ6S; + } else _6W7oc3M6xwrzSHgtjRALx; }; })) { final content = sys.io.File.getContent(".FlxDirector.json"); final json:haxe.DynamicAccess = haxe.Json.parse(content); @@ -93,14 +93,14 @@ class FlxDirector implements Director):Map return { if (Prelude.truthy({ - final _dtDEySjaC9Aw3sBcAMSHJv:Dynamic = sys.FileSystem.exists(".FlxDirector.json"); + final _jPTpPcp7jmu7tzTUYWrQQc:Dynamic = sys.FileSystem.exists(".FlxDirector.json"); { - if (Prelude.truthy(_dtDEySjaC9Aw3sBcAMSHJv)) { - final _wQX87xankXpS8b4yPq79SG:Dynamic = !Prelude.truthy(sys.FileSystem.isDirectory(".FlxDirector.json")); + if (Prelude.truthy(_jPTpPcp7jmu7tzTUYWrQQc)) { + final _nPhEdyFWZ4rZ8d6RyFKc4a:Dynamic = !Prelude.truthy(sys.FileSystem.isDirectory(".FlxDirector.json")); { - _wQX87xankXpS8b4yPq79SG; + _nPhEdyFWZ4rZ8d6RyFKc4a; }; - } else _dtDEySjaC9Aw3sBcAMSHJv; + } else _jPTpPcp7jmu7tzTUYWrQQc; }; })) { final content = sys.io.File.getContent(".FlxDirector.json"); final json:haxe.DynamicAccess = haxe.Json.parse(content); @@ -125,23 +125,23 @@ class FlxDirector implements Director>)) { - final _mWbdR2jcD6J3Vkcv5hxf4x = _pCtjmr5q3eaZiaiPVhUQ5y; final action:FlxActionDigital = _mWbdR2jcD6J3Vkcv5hxf4x[0]; final trigger:FlxInputState = _mWbdR2jcD6J3Vkcv5hxf4x[1]; + for (_eUF74RxfWgTRE11hKzounJ in (Prelude.zipThrow(new kiss.List([continueAction, fastForwardAction]), new kiss.List([JUST_PRESSED, PRESSED])) : Array>)) { + final _aVq547xCteR7EUauCrhrPz = _eUF74RxfWgTRE11hKzounJ; final action:FlxActionDigital = _aVq547xCteR7EUauCrhrPz[0]; final trigger:FlxInputState = _aVq547xCteR7EUauCrhrPz[1]; { action.addKey(SPACE, trigger); action.addKey(ENTER, trigger); @@ -230,13 +230,13 @@ class FlxDirector implements Director) return { switch type { - case _oQbPed1sZn9KLbhqz2skjy if (Prelude.truthy(Prelude.isNull(_oQbPed1sZn9KLbhqz2skjy))):{ + case _eRMU5rHn3TJidmo7ih2sYC if (Prelude.truthy(Prelude.isNull(_eRMU5rHn3TJidmo7ih2sYC))):{ { name; }; @@ -519,37 +519,37 @@ class FlxDirector implements Director") : String)); - pauseMenu.makeText(""); + pauseMenu.makeTextV2(""); }; case Dialog(speaker, type, _wryly, text):{ - pauseMenu.makeText(specialTypesSpeakerName(speaker, type)); + pauseMenu.makeTextV2(specialTypesSpeakerName(speaker, type)); pauseMenu.makeMultilineText(specialHistoryChars(text)); - pauseMenu.makeText(""); + pauseMenu.makeTextV2(""); }; case Super(text):{ - pauseMenu.makeText(text); - pauseMenu.makeText(""); + pauseMenu.makeTextV2(text); + pauseMenu.makeTextV2(""); }; default:{ - throw kiss.Prelude.runtimeInsertAssertionMessage("case should never match pattern otherwise", "/Users/nat/repos/hollywoo-flixel/src/hollywoo_flixel/FlxDirector.kiss:255:17: Assertion failed: \nFrom:[(never otherwise)]", 4); + throw kiss.Prelude.runtimeInsertAssertionMessage("case should never match pattern otherwise", "/Users/nat/repos/hollywoo-flixel/src/hollywoo_flixel/FlxDirector.kiss:265:17: Assertion failed: \nFrom:[(never otherwise)]", 4); }; }; }; @@ -582,7 +582,7 @@ class FlxDirector implements Director = haxe.Json.parse(content); @@ -799,14 +799,14 @@ class FlxDirector implements Director = haxe.Json.parse(content); @@ -833,14 +833,14 @@ class FlxDirector implements Director = haxe.Json.parse(content); @@ -856,14 +856,14 @@ class FlxDirector implements Director = haxe.Json.parse(content); @@ -890,14 +890,14 @@ class FlxDirector implements Director = haxe.Json.parse(content); @@ -913,14 +913,14 @@ class FlxDirector implements Director = haxe.Json.parse(content); @@ -945,28 +945,28 @@ class FlxDirector implements Director, submit:(String)->Void, ?xButton:Bool, ?xKey:String):Void { - pauseMenu = kiss_flixel.SimpleWindow.promptForChoice(prompt, choices, submit, flixel.util.FlxColor.BLACK, textColor, buttonColor, 0.8, 0.8, Prelude.truthy(xButton), { - final _uZ3KA1DF92ALHSgGxxjQXk:Dynamic = xKey; + pauseMenu = kiss_flixel.SimpleWindow.promptForChoiceV2(prompt, choices, submit, { bgColor : flixel.util.FlxColor.BLACK, titleColor : textColor, choiceColor : buttonColor, percentWidth : 0.8, percentHeight : 0.8, xButton : Prelude.truthy(xButton), xKey : { + final _mnTZ1YNr7uyNWq9FyYbPpZ:Dynamic = xKey; { - if (Prelude.truthy(_uZ3KA1DF92ALHSgGxxjQXk)) _uZ3KA1DF92ALHSgGxxjQXk else { - final _4pBG9YrcYhv7AiGyCngse:Dynamic = ""; + if (Prelude.truthy(_mnTZ1YNr7uyNWq9FyYbPpZ)) _mnTZ1YNr7uyNWq9FyYbPpZ else { + final _gZcXRfQAt4K3PYbfGbuMB:Dynamic = ""; { - _4pBG9YrcYhv7AiGyCngse; + _gZcXRfQAt4K3PYbfGbuMB; }; }; }; - }, "left", "right", "up", "down", "enter", null, false, true); + }, leftKey : "left", rightKey : "right", upKey : "up", downKey : "down", enterKey : "enter", wrapPrompt : true }); pauseMenu.setUIControlColor(buttonColor); pauseMenu.enableGamepadInput(true, [START => ""]); } public function enterString(prompt:String, submit:(String)->Void):Void { sh.cancel(); - pauseMenu = SimpleWindow.promptForString(prompt, function(s) return { + pauseMenu = SimpleWindow.promptForStringV2(prompt, function(s) return { { sh.start(); submit(s); }; - }, null, null, null, null, null, false, null, null, null, null, null, null, null, true); + }, { wrapPrompt : true }); } public function defineFlxPoint(submit:(flixel.math.FlxPoint)->Void):Void { if (Prelude.truthy(!Prelude.truthy(mm))) { @@ -1025,12 +1025,12 @@ class FlxDirector implements Director, appearance:Appearance, camera:flixel.FlxCamera, cc:Continuation):Void { { - final _pkv1WGjoWxdF2MynVrYjVb = appearance; + final _v6anR1vrz1C1LZ5eVXDUfB = appearance; { - if (Prelude.truthy(_pkv1WGjoWxdF2MynVrYjVb)) switch _pkv1WGjoWxdF2MynVrYjVb { - case _fe2rMKuigHw11UwDR4zM1N if (Prelude.truthy(Prelude.isNull(_fe2rMKuigHw11UwDR4zM1N))):{ + if (Prelude.truthy(Prelude.isNotNull(_v6anR1vrz1C1LZ5eVXDUfB))) switch _v6anR1vrz1C1LZ5eVXDUfB { + case _6Fum6NoxPirge3ox4L6yiT if (Prelude.truthy(Prelude.isNull(_6Fum6NoxPirge3ox4L6yiT))):{ { null; }; @@ -1299,10 +1299,10 @@ class FlxDirector implements Director; public function onContinue(continueAction:FlxActionDigital) return { { - final _6nPPVd5aH9QvChYiHSvSvr = nextCC; + final _mc7ovV4JdbqCQPgGeC9WpE = nextCC; { - if (Prelude.truthy(_6nPPVd5aH9QvChYiHSvSvr)) switch _6nPPVd5aH9QvChYiHSvSvr { - case _jUhCstzW6WwSyqbk8P3fje if (Prelude.truthy(Prelude.isNull(_jUhCstzW6WwSyqbk8P3fje))):{ + if (Prelude.truthy(Prelude.isNotNull(_mc7ovV4JdbqCQPgGeC9WpE))) switch _mc7ovV4JdbqCQPgGeC9WpE { + case _hX61VXPeWaaDmDTuzCmCco if (Prelude.truthy(Prelude.isNull(_hX61VXPeWaaDmDTuzCmCco))):{ { null; }; @@ -1407,12 +1407,12 @@ class FlxDirector implements Director, wryly:String, text:String, cc:Continuation) return { var speakerNameX:Float = -1; switch type { - case _3YEntcDf5U5ay9HNf8fUWC if (Prelude.truthy(Prelude.isNull(_3YEntcDf5U5ay9HNf8fUWC))):{ + case _t2CcEJPbTcb3CJAMQTXSJD if (Prelude.truthy(Prelude.isNull(_t2CcEJPbTcb3CJAMQTXSJD))):{ { }; }; case Super:{ @@ -1596,14 +1596,14 @@ class FlxDirector implements Director = haxe.Json.parse(content); @@ -1619,14 +1619,14 @@ class FlxDirector implements Director = haxe.Json.parse(content); @@ -1649,14 +1649,14 @@ class FlxDirector implements Director = haxe.Json.parse(content); @@ -1672,14 +1672,14 @@ class FlxDirector implements Director = haxe.Json.parse(content); @@ -1746,7 +1746,7 @@ class FlxDirector implements Director = haxe.Json.parse(content); @@ -1828,14 +1828,14 @@ class FlxDirector implements Director = haxe.Json.parse(content); @@ -1905,14 +1905,14 @@ class FlxDirector implements Director = haxe.Json.parse(content); @@ -1928,14 +1928,14 @@ class FlxDirector implements Director = haxe.Json.parse(content); @@ -1997,7 +1997,7 @@ class FlxDirector implements Director:Void (_resume null))) + (set pauseMenu (SimpleWindow.create + (object + title "HISTORY" + bgColor FlxColor.BLACK + textColor textColor + percentWidth 0.6 + percentHeight 0.9 + xButton true + upKey "up" + downKey "down" + onClose ->:Void (_resume null)))) (pauseMenu.enableVerticalScrolling) (pauseMenu.enableGamepadInput true) - (pauseMenu.makeText "") + (pauseMenu.makeTextV2 "") (doFor element history (case element ((Sound caption) - (pauseMenu.makeText "<${caption}>") - (pauseMenu.makeText "")) + (pauseMenu.makeTextV2 "<${caption}>") + (pauseMenu.makeTextV2 "")) ((Dialog speaker type _wryly text) - (pauseMenu.makeText (specialTypesSpeakerName speaker type)) + (pauseMenu.makeTextV2 (specialTypesSpeakerName speaker type)) (pauseMenu.makeMultilineText (specialHistoryChars text)) - (pauseMenu.makeText "")) + (pauseMenu.makeTextV2 "")) ((Super text) - (pauseMenu.makeText text) - (pauseMenu.makeText "")) + (pauseMenu.makeTextV2 text) + (pauseMenu.makeTextV2 "")) (never otherwise))) (sh.registerItem "{tab} resume" _resume true) (sh.registerItem "{escape} resume" _resume true) @@ -382,48 +392,34 @@ (method :Void _chooseString [:String prompt :Array choices :String->Void submit &opt :Bool xButton :String xKey] (set pauseMenu - (kiss_flixel.SimpleWindow.promptForChoice + (kiss_flixel.SimpleWindow.promptForChoiceV2 prompt choices submit - FlxColor.BLACK - textColor - buttonColor - 0.8 - 0.8 - ?xButton - (or xKey "") - "left" - "right" - "up" - "down" - "enter" - null - false - true)) + (object + bgColor FlxColor.BLACK + titleColor textColor + choiceColor buttonColor + percentWidth 0.8 + percentHeight 0.8 + xButton ?xButton + xKey (or xKey "") + leftKey "left" + rightKey "right" + upKey "up" + downKey "down" + enterKey "enter" + wrapPrompt true))) (pauseMenu.setUIControlColor buttonColor) (pauseMenu.enableGamepadInput true [=>START ""])) (method :Void enterString [:String prompt :String->Void submit] (sh.cancel) (set pauseMenu - (SimpleWindow.promptForString + (SimpleWindow.promptForStringV2 prompt ->s {(sh.start)(submit s)} - null - null - null - null - null - false - null - null - null - null - null - null - null - true))) + (object wrapPrompt true)))) (method :Void defineFlxPoint [:FlxPoint->Void submit] (unless mm diff --git a/src/hollywoo_flixel/HollywooFlixelDSL.kiss b/src/hollywoo_flixel/HollywooFlixelDSL.kiss index 30e2efa..0e05a8b 100644 --- a/src/hollywoo_flixel/HollywooFlixelDSL.kiss +++ b/src/hollywoo_flixel/HollywooFlixelDSL.kiss @@ -904,14 +904,16 @@ (director.chooseString "Color which light source?" (withCancel stringArr) (unlessCancel choice (let [ls (dictGet stringMap choice)] - (SimpleWindow.promptForColor "Which color?" + (SimpleWindow.promptForColorV2 "Which color?" ->color { (set ls.color color) (lightSources.put sceneKey arr) (_updateLighting) (cc) } - null ls.color true) + (object + currentColor ls.color + allowAlpha true)) (return))))))] (.registerItem (director.shortcutHandler) "[d]efine light [c]olor" defineLightColor))