tk2dCameraResolutionOverride Class Reference

Controls camera scale for different resolutions. Use this to display at 0.5x scale on iPhone3G or 2x scale on iPhone4. More...

List of all members.

Public Types

enum  MatchByType
 Match by type. More...
enum  AutoScaleMode
 Auto Scale mode. More...

Public Member Functions

bool Match (int pixelWidth, int pixelHeight)
 Returns true if this instance of tk2dCameraResolutionOverride matches the curent resolution. In future versions this may change to support ranges of resolutions in addition to explict ones.

Public Attributes

string name
 Name of the override.
MatchByType matchBy = MatchByType.Resolution
 How to identify matches for this override.
int width
 Screen width to match.
int height
 Screen height to match.
float aspectRatioNumerator = 4.0f
 Aspect ratio to match to, stored as numerator and denominator to make it easier to match accurately.
float scale = 1.0f
 Amount to scale the matched resolution by 1.0 = pixel perfect, 0.5 = 50% of pixel perfect size.
Vector2 offsetPixels = new Vector2(0, 0)
 Amount to offset from the bottom left, in number of pixels in target resolution. Example, if override resolution is 1024x768, an offset of 20 will offset in by 20 pixels.
AutoScaleMode autoScaleMode = AutoScaleMode.None
 How scaling is performed.

Detailed Description

Controls camera scale for different resolutions. Use this to display at 0.5x scale on iPhone3G or 2x scale on iPhone4.


Member Enumeration Documentation


Member Function Documentation

bool tk2dCameraResolutionOverride.Match ( int  pixelWidth,
int  pixelHeight 
)

Returns true if this instance of tk2dCameraResolutionOverride matches the curent resolution. In future versions this may change to support ranges of resolutions in addition to explict ones.


Member Data Documentation

Aspect ratio to match to, stored as numerator and denominator to make it easier to match accurately.

How scaling is performed.

Screen height to match.

How to identify matches for this override.

Name of the override.

Vector2 tk2dCameraResolutionOverride.offsetPixels = new Vector2(0, 0)

Amount to offset from the bottom left, in number of pixels in target resolution. Example, if override resolution is 1024x768, an offset of 20 will offset in by 20 pixels.

Amount to scale the matched resolution by 1.0 = pixel perfect, 0.5 = 50% of pixel perfect size.

Screen width to match.