Skip to content

Commit

Permalink
use FlxContainer in FlxUIGroup
Browse files Browse the repository at this point in the history
  • Loading branch information
Geokureli committed Mar 9, 2024
1 parent 8f2a269 commit dd3f70f
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion flixel/addons/ui/FlxUIGroup.hx
Expand Up @@ -4,6 +4,9 @@ import flixel.FlxSprite;
import flixel.group.FlxSpriteGroup;
import flixel.math.FlxRect;
import flixel.addons.ui.interfaces.IFlxUIWidget;
#if (flixel >= "5.7.0")
import flixel.group.FlxSpriteContainer;
#end

#if (flixel < "5.4.0" && FLX_NO_POINT_POOL)
/* This is a weird haxe bug I haven't figured out, fixed in 5.4.0
Expand All @@ -13,14 +16,19 @@ import flixel.addons.ui.interfaces.IFlxUIWidget;
#error "This version of flixel-ui is not compatible with flixel versions less than 5.4.0";
#end

/**
* A cheap extension of FlxSpriteGroup that lets you move all the children around
* without having to call reset()
* @author Lars Doucet
*/
typedef FlxUIGroup = FlxTypedUIGroup<FlxSprite>;
/**
* A cheap extension of FlxSpriteGroup that lets you move all the children around
* without having to call reset()
* @author Lars Doucet
*/
class FlxTypedUIGroup<T:FlxSprite>
extends #if(flixel >= "5.7.0") FlxTypedSpriteGroup<T> #else FlxTypedSpriteContainer<T> #end
extends #if(flixel < "5.7.0") FlxTypedSpriteGroup<T> #else FlxTypedSpriteContainer<T> #end
implements IFlxUIWidget
{
/** a handy string handler name for this thing */
Expand Down

0 comments on commit dd3f70f

Please sign in to comment.