Static variables

@:value(FlxPoint.get(0, 0))staticcutoutSize:FlxPoint = FlxPoint.get(0, 0)

The size of the screen cutout (e.g., for notches or camera cutouts).

staticenabled:Bool

Whether fullscreen scaling is enabled.

@:value(FlxPoint.get(0, 0))staticgameCutoutSize:FlxPoint = FlxPoint.get(0, 0)

The size of the game cutout.

@:value(FlxPoint.get(0, 0))staticgameNotchPosition:FlxPoint = FlxPoint.get(0, 0)

The position of the notch in game coordinates.

@:value(FlxPoint.get(0, 0))staticgameNotchSize:FlxPoint = FlxPoint.get(0, 0)

The size of the notch in game coordinates.

@:value(-1)staticgameRatio:Float = -1

The aspect ratio of the game screen.

@:value(false)statichasFakeCutouts:Bool = false

Wether fake cutouts are added to the screen.

@:value(null)staticinstance:FullScreenScaleMode = null

Singleton instance of the FullScreenScaleMode.

@:value(FlxPoint.get(0, 0))staticlogicalSize:FlxPoint = FlxPoint.get(0, 0)

The size of the game in screen resolution relativly to the initial size. eg: If screen is 1080p and initial size of the game is 1280x720 then this is 1920x1080.

@:value(FlxPoint.get(20, 9))staticmaxAspectRatio:FlxPoint = FlxPoint.get(20, 9)

The maximum aspect ratio a screen can have.

@:value(X)staticmaxRatioAxis:FlxAxes = X

The maximum ratio axis indicating on which axis the black bar will be added.

@:value(FlxPoint.get(0, 0))staticnotchPosition:FlxPoint = FlxPoint.get(0, 0)

The position of the notch on the screen.

@:value(FlxPoint.get(0, 0))staticnotchSize:FlxPoint = FlxPoint.get(0, 0)

The size of the notch on the screen.

@:value(X)staticratioAxis:FlxAxes = X

Axis used to determine the ratio (X or Y).

@:value(-1)staticscreenRatio:Float = -1

The aspect ratio of the window.

@:value(FlxPoint.get(1, 1))staticwideScale:FlxPoint = FlxPoint.get(1, 1)

The scale factor for the window.

Static methods

@:value({ tweenDuration : 0.0 })staticaddCutouts(tweenDuration:Float = 0.0, ?ease:Float ‑> Float):Void

Add fake cutouts into the screen. Useful for when switching from wide display into 16:9 seamlessly and directly is needed.

Parameters:

tweenDuration

The duration of the tweens that adds the cutout bars. Using 0 will instantly put them on screen.

ease

The function that's used for the tween.

@:value({ tweenDuration : 0.0 })staticremoveCutouts(tweenDuration:Float = 0.0, ?ease:Float ‑> Float):Void

Remove the fake cutouts from the screen. Used to go back from 16:9 into widescreen seamlessly and directly when needed.

Parameters:

tweenDuration

The duration of the tweens that remove the cutout bars. Using 0 will instantly put them off screen.

ease

The function that's used for the tween.

Constructor

@:value({ enable : true })new(enable:Bool = true)

Constructor for FullScreenScaleMode.

Parameters:

enable

Whether fullscreen scaling should be enabled by default.

Methods

onMeasure(Width:Int, Height:Int):Void

Measures and adjusts the game layout based on the provided screen width and height.

Parameters:

Width

The width of the screen.

Height

The height of the screen.

onMeasureAwait(Width:Int, Height:Int):Void

Locks the game to the current aspect ratio and assignes the requested resolution as awaited for later.

Parameters:

Width

The width of the screen.

Height

The height of the screen.

@:has_untypedonMeasureInstant(Width:Int, Height:Int):Void

Instantly apply the measured resolution to the game

Parameters:

Width

The width of the screen.

Height

The height of the screen.

onMeasurePostAwait():Void

Unlock the game resolution and swap into the awaited one.

reset():Void

Inherited Variables

Defined by BaseScaleMode

@:value(CENTER)horizontalAlign:FlxHorizontalAlign = CENTER

read onlyoffset:FlxPoint

read onlyscale:FlxPoint

@:value(CENTER)verticalAlign:FlxVerticalAlign = CENTER

Inherited Methods