From affaa67c51f7f39b9de65b9b141170661754caf0 Mon Sep 17 00:00:00 2001 From: Nat Quayle Nelson Date: Mon, 12 Jun 2023 14:27:24 -0600 Subject: [PATCH] Bring back FullControl, but size-aware --- src/hollywoo_flixel/HollywooFlixelDSL.kiss | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/hollywoo_flixel/HollywooFlixelDSL.kiss b/src/hollywoo_flixel/HollywooFlixelDSL.kiss index 4426b94..289ce42 100644 --- a/src/hollywoo_flixel/HollywooFlixelDSL.kiss +++ b/src/hollywoo_flixel/HollywooFlixelDSL.kiss @@ -111,6 +111,11 @@ (_canvas.makeGraphic FlxG.width FlxG.height FlxColor.BLACK)) _canvas) +(method :StagePosition FullControl [:FlxSprite s :Int layer :RelativePosition rpos] + (assert (<= 0 layer FlxDirector.LAYER_MAX) "Layer $layer is out of range 0-$FlxDirector.LAYER_MAX") + (let [[x y] (SpriteTools.positionOn s (canvas) rpos)] + (new StagePosition x y layer))) + (method namePlates [:Array names :Dynamic delayLength :Bool delayWhileShown :Void->Void cc] (let [plates (for name names