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/Align.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

55 lines
1.9 KiB
ActionScript

// =================================================================================================
//
// Starling Framework
// Copyright Gamua GmbH. All Rights Reserved.
//
// This program is free software. You can redistribute and/or modify it
// in accordance with the terms of the accompanying license agreement.
//
// =================================================================================================
package starling.utils
{
import starling.errors.AbstractClassError;
/** A class that provides constant values for horizontal and vertical alignment of objects. */
public final class Align
{
/** @private */
public function Align() { throw new AbstractClassError(); }
/** Horizontal left alignment. */
public static const LEFT:String = "left";
/** Horizontal right alignment. */
public static const RIGHT:String = "right";
/** Vertical top alignment. */
public static const TOP:String = "top";
/** Vertical bottom alignment. */
public static const BOTTOM:String = "bottom";
/** Centered alignment. */
public static const CENTER:String = "center";
/** Indicates whether the given alignment string is valid. */
public static function isValid(align:String):Boolean
{
return align == LEFT || align == RIGHT || align == CENTER ||
align == TOP || align == BOTTOM;
}
/** Indicates if the given string is a valid horizontal alignment. */
public static function isValidHorizontal(align:String):Boolean
{
return align == LEFT || align == CENTER || align == RIGHT;
}
/** Indicates if the given string is a valid vertical alignment. */
public static function isValidVertical(align:String):Boolean
{
return align == TOP || align == CENTER || align == BOTTOM;
}
}
}