NGUI: Next-Gen UI kit  3.7.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Macros
UIAtlas Class Reference

UI Atlas contains a collection of sprites inside one large texture atlas. More...

Inheritance diagram for UIAtlas:

Public Member Functions

UISpriteData GetSprite (string name)
 Convenience function that retrieves a sprite by name. More...
 
void MarkSpriteListAsChanged ()
 Rebuild the sprite indices. Call this after modifying the spriteList at run time. More...
 
void SortAlphabetically ()
 Sort the list of sprites within the atlas, making them alphabetical. More...
 
BetterList< string > GetListOfSprites ()
 Convenience function that retrieves a list of all sprite names. More...
 
BetterList< string > GetListOfSprites (string match)
 Convenience function that retrieves a list of all sprite names that contain the specified phrase More...
 
void MarkAsChanged ()
 Mark all widgets associated with this atlas as having changed. More...
 

Static Public Member Functions

static bool CheckIfRelated (UIAtlas a, UIAtlas b)
 Helper function that determines whether the two atlases are related. More...
 

Properties

Material spriteMaterial [get, set]
 Material used by the atlas. More...
 
bool premultipliedAlpha [get]
 Whether the atlas is using a premultiplied alpha material. More...
 
List< UISpriteDataspriteList [get, set]
 List of sprites within the atlas. More...
 
Texture texture [get]
 Texture used by the atlas. More...
 
float pixelSize [get, set]
 Pixel size is a multiplier applied to widgets dimensions when performing MakePixelPerfect() pixel correction. Most obvious use would be on retina screen displays. The resolution doubles, but with UIRoot staying the same for layout purposes, you can still get extra sharpness by switching to an HD atlas that has pixel size set to 0.5. More...
 
UIAtlas replacement [get, set]
 Setting a replacement atlas value will cause everything using this atlas to use the replacement atlas instead. Suggested use: set up all your widgets to use a dummy atlas that points to the real atlas. Switching that atlas to another one (for example an HD atlas) is then a simple matter of setting this field on your dummy atlas. More...
 

Detailed Description

UI Atlas contains a collection of sprites inside one large texture atlas.

Member Function Documentation

static bool UIAtlas.CheckIfRelated ( UIAtlas  a,
UIAtlas  b 
)
static

Helper function that determines whether the two atlases are related.

BetterList<string> UIAtlas.GetListOfSprites ( )

Convenience function that retrieves a list of all sprite names.

BetterList<string> UIAtlas.GetListOfSprites ( string  match)

Convenience function that retrieves a list of all sprite names that contain the specified phrase

UISpriteData UIAtlas.GetSprite ( string  name)

Convenience function that retrieves a sprite by name.

void UIAtlas.MarkAsChanged ( )

Mark all widgets associated with this atlas as having changed.

void UIAtlas.MarkSpriteListAsChanged ( )

Rebuild the sprite indices. Call this after modifying the spriteList at run time.

void UIAtlas.SortAlphabetically ( )

Sort the list of sprites within the atlas, making them alphabetical.

Property Documentation

float UIAtlas.pixelSize
getset

Pixel size is a multiplier applied to widgets dimensions when performing MakePixelPerfect() pixel correction. Most obvious use would be on retina screen displays. The resolution doubles, but with UIRoot staying the same for layout purposes, you can still get extra sharpness by switching to an HD atlas that has pixel size set to 0.5.

bool UIAtlas.premultipliedAlpha
get

Whether the atlas is using a premultiplied alpha material.

UIAtlas UIAtlas.replacement
getset

Setting a replacement atlas value will cause everything using this atlas to use the replacement atlas instead. Suggested use: set up all your widgets to use a dummy atlas that points to the real atlas. Switching that atlas to another one (for example an HD atlas) is then a simple matter of setting this field on your dummy atlas.

List<UISpriteData> UIAtlas.spriteList
getset

List of sprites within the atlas.

Material UIAtlas.spriteMaterial
getset

Material used by the atlas.

Texture UIAtlas.texture
get

Texture used by the atlas.


The documentation for this class was generated from the following file: