class FullScreenScaleMode
package funkin.ui
extends BaseScaleMode
Available on all platforms
Static variables
staticcutoutSize:FlxPoint = FlxPoint.get(0, 0)
The size of the screen cutout (e.g., for notches or camera cutouts).
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.
staticmaxRatioAxis:FlxAxes = X
The maximum ratio axis indicating on which axis the black bar will be added.
Static methods
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. |
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
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. |
onMeasureInstant(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. |