diff --git a/flixel/addons/display/FlxBackdrop.hx b/flixel/addons/display/FlxBackdrop.hx index 90731e13..cdc498a5 100644 --- a/flixel/addons/display/FlxBackdrop.hx +++ b/flixel/addons/display/FlxBackdrop.hx @@ -113,6 +113,9 @@ class FlxBackdrop extends FlxSprite drawToLargestCamera(); } + #if (flixel >= "5.7.0") + final cameras = getCamerasLegacy(); + #end for (camera in cameras) { if (!camera.visible || !camera.exists || !isOnScreen(camera)) @@ -156,6 +159,9 @@ class FlxBackdrop extends FlxSprite { var largest:FlxCamera = null; var largestArea = 0.0; + #if (flixel >= "5.7.0") + final cameras = getCamerasLegacy(); // else use this.cameras + #end for (camera in cameras) { if (!camera.visible || !camera.exists || !isOnScreen(camera)) diff --git a/flixel/addons/display/FlxSliceSprite.hx b/flixel/addons/display/FlxSliceSprite.hx index 24dfbe1e..a948ec39 100644 --- a/flixel/addons/display/FlxSliceSprite.hx +++ b/flixel/addons/display/FlxSliceSprite.hx @@ -511,7 +511,7 @@ class FlxSliceSprite extends FlxStrip renderSprite.y = y; renderSprite.scale.copyFrom(scale); renderSprite.scrollFactor.set(scrollFactor.x, scrollFactor.y); - renderSprite.cameras = cameras; + renderSprite._cameras = _cameras; renderSprite.draw(); } else diff --git a/flixel/addons/display/FlxTiledSprite.hx b/flixel/addons/display/FlxTiledSprite.hx index b47b8efe..4fe74730 100644 --- a/flixel/addons/display/FlxTiledSprite.hx +++ b/flixel/addons/display/FlxTiledSprite.hx @@ -144,7 +144,7 @@ class FlxTiledSprite extends FlxStrip renderSprite.x = x; renderSprite.y = y; renderSprite.scrollFactor.set(scrollFactor.x, scrollFactor.y); - renderSprite.cameras = cameras; + renderSprite._cameras = _cameras; renderSprite.draw(); } else diff --git a/flixel/addons/editors/spine/FlxSpine.hx b/flixel/addons/editors/spine/FlxSpine.hx index bd95dcd2..7851c57c 100644 --- a/flixel/addons/editors/spine/FlxSpine.hx +++ b/flixel/addons/editors/spine/FlxSpine.hx @@ -268,7 +268,7 @@ class FlxSpine extends FlxSprite { wrapper.x = 0; wrapper.y = 0; - wrapper.cameras = cameras; + wrapper._cameras = _cameras; #if (flash || openfl >= "4.0.0") wrapper.vertices.length = verticesLength; diff --git a/flixel/addons/effects/FlxTrail.hx b/flixel/addons/effects/FlxTrail.hx index 186637fa..6f5112b1 100644 --- a/flixel/addons/effects/FlxTrail.hx +++ b/flixel/addons/effects/FlxTrail.hx @@ -4,7 +4,7 @@ import flixel.animation.FlxAnimation; import flixel.FlxG; import flixel.FlxSprite; import flixel.group.FlxGroup; -import flixel.group.FlxSpriteGroup; +import flixel.group.*; import flixel.system.FlxAssets; import flixel.util.FlxArrayUtil; import flixel.util.FlxDestroyUtil; @@ -17,7 +17,7 @@ import flixel.math.FlxPoint; * Feel free to use this class and adjust it to your needs. * @author Gama11 */ -class FlxTrail extends FlxSpriteGroup +class FlxTrail extends #if (flixel < "5.7.0") FlxSpriteGroup #else FlxSpriteContainer #end { /** * Stores the FlxSprite the trail is attached to. diff --git a/flixel/addons/transition/TransitionEffect.hx b/flixel/addons/transition/TransitionEffect.hx index fda10cc2..281d7af7 100644 --- a/flixel/addons/transition/TransitionEffect.hx +++ b/flixel/addons/transition/TransitionEffect.hx @@ -3,14 +3,14 @@ package flixel.addons.transition; import flixel.addons.transition.FlxTransitionSprite.TransitionStatus; import flixel.addons.transition.TransitionData; import flixel.group.FlxGroup; -import flixel.group.FlxSpriteGroup; +import flixel.group.*; import flixel.util.FlxTimer; /** * @author larsiusprime */ @:allow(flixel.addons.transition.Transition) -class TransitionEffect extends FlxSpriteGroup +class TransitionEffect extends #if (flixel < "5.7.0") FlxSpriteGroup #else FlxSpriteContainer #end { public var finishCallback:Void->Void; public var finished(default, null):Bool = false; diff --git a/flixel/addons/ui/FlxButtonPlus.hx b/flixel/addons/ui/FlxButtonPlus.hx index 2b13ca15..a2d2b93c 100644 --- a/flixel/addons/ui/FlxButtonPlus.hx +++ b/flixel/addons/ui/FlxButtonPlus.hx @@ -9,7 +9,7 @@ import flixel.FlxCamera; import flixel.FlxG; import flixel.FlxSprite; import flixel.graphics.FlxGraphic; -import flixel.group.FlxSpriteGroup; +import flixel.group.*; import flixel.text.FlxText; import flixel.util.FlxColor; import flixel.util.FlxDestroyUtil; @@ -24,7 +24,7 @@ import flixel.math.FlxMath; * @link http://www.photonstorm.com * @author Richard Davey / Photon Storm */ -class FlxButtonPlus extends FlxSpriteGroup +class FlxButtonPlus extends #if (flixel < "5.7.0") FlxSpriteGroup #else FlxSpriteContainer #end { public static inline var NORMAL:Int = 0; public static inline var HIGHLIGHT:Int = 1; diff --git a/flixel/addons/ui/FlxClickArea.hx b/flixel/addons/ui/FlxClickArea.hx index 8658b4a3..025d245f 100644 --- a/flixel/addons/ui/FlxClickArea.hx +++ b/flixel/addons/ui/FlxClickArea.hx @@ -127,6 +127,9 @@ class FlxClickArea extends FlxObject if (continueUpdate) { var offAll:Bool = true; + #if (flixel >= "5.7.0") + final cameras = getCameras(); // else use this.cameras + #end for (camera in cameras) { #if FLX_MOUSE diff --git a/flixel/addons/ui/FlxSlider.hx b/flixel/addons/ui/FlxSlider.hx index 360f1f62..9522d8e4 100644 --- a/flixel/addons/ui/FlxSlider.hx +++ b/flixel/addons/ui/FlxSlider.hx @@ -3,20 +3,20 @@ package flixel.addons.ui; #if FLX_MOUSE import flixel.FlxG; import flixel.FlxSprite; -import flixel.group.FlxSpriteGroup; -import flixel.text.FlxText; -import flixel.util.FlxDestroyUtil; +import flixel.group.*; import flixel.math.FlxMath; import flixel.math.FlxPoint; import flixel.math.FlxRect; -import flixel.util.FlxSpriteUtil; +import flixel.text.FlxText; import flixel.util.FlxColor; +import flixel.util.FlxDestroyUtil; +import flixel.util.FlxSpriteUtil; /** * A slider GUI element for float and integer manipulation. * @author Gama11 */ -class FlxSlider extends FlxSpriteGroup +class FlxSlider extends #if (flixel < "5.7.0") FlxSpriteGroup #else FlxSpriteContainer #end { /** * The horizontal line in the background. @@ -271,7 +271,11 @@ class FlxSlider extends FlxSpriteGroup override public function update(elapsed:Float):Void { // Clicking and sound logic - if (FlxMath.mouseInFlxRect(false, _bounds)) + #if (flixel >= "5.7.0") + final camera = getCameras()[0];// else use this.camera + #end + final mouse = FlxG.mouse.getScreenPosition(camera); + if (FlxMath.pointInFlxRect(mouse.x, mouse.y, _bounds)) { if (hoverAlpha != 1) {