Skip to main content

ViewportVisuals

Kindclass
Packagebackend
Full namebackend.ViewportVisuals
Sourcesource/backend/ViewportVisuals.hx

Layout for full-screen artwork and solid overlays (never non-uniformly stretch art).

Public methods​

cover​

static function cover(sprite:FlxSprite, minimumScale:Float = 1):Void

Cover the viewport with a menu image; preserve its aspect ratio.

ParameterTypeDefault
spriteFlxSprite—
minimumScale (optional)Float1

View source

overscan​

static function overscan(sprite:FlxSprite):Void

Cover camera zoom/rotation, even on an ultrawide viewport, with a solid stage flash.

ParameterTypeDefault
spriteFlxSprite—

View source

fill​

static function fill(sprite:FlxSprite, height:Int = -1):Void

Expand an opaque/solid rectangle to the current viewport.

ParameterTypeDefault
spriteFlxSprite—
height (optional)Int-1

View source