1
0
mirror of https://github.com/TerryCavanagh/VVVVVV.git synced 2024-06-18 10:38:31 +02:00
VVVVVV/mobile_version/src/starling/utils/ScaleMode.as
Terry Cavanagh 72d018ea04 Update mobile version to mobile v2.2.1
The android version just got a much needed update to fix some resolution issues on devices with cutouts.

It turns out the mobile source was actually pretty out of date, like 3 versions out of date! This commit brings it up to date.

All the changes have just been about keeping the game running on modern devices, though. The biggest change was adding the Starling library to the project, which made the game GPU powered and sped the whole thing up.
2022-12-02 18:19:58 +01:00

30 lines
1.3 KiB
ActionScript

package starling.utils
{
import starling.errors.AbstractClassError;
/** A class that provides constant values for the 'RectangleUtil.fit' method. */
public class ScaleMode
{
/** @private */
public function ScaleMode() { throw new AbstractClassError(); }
/** Specifies that the rectangle is not scaled, but simply centered within the
* specified area. */
public static const NONE:String = "none";
/** Specifies that the rectangle fills the specified area without distortion
* but possibly with some cropping, while maintaining the original aspect ratio. */
public static const NO_BORDER:String = "noBorder";
/** Specifies that the entire rectangle will be scaled to fit into the specified
* area, while maintaining the original aspect ratio. This might leave empty bars at
* either the top and bottom, or left and right. */
public static const SHOW_ALL:String = "showAll";
/** Indicates whether the given scale mode string is valid. */
public static function isValid(scaleMode:String):Boolean
{
return scaleMode == NONE || scaleMode == NO_BORDER || scaleMode == SHOW_ALL;
}
}
}