Detailed Description

There may be times when you want to display an image for which you only have the Texture2D object. In this case, you can add it to the cache with a given name and then access it in PowerUI using cache://theNameYouUsed. The most useful method for this is PowerUI.ImageCache.Add.

Static Public Member Functions

static void Add (string address, Texture2D image)
 Adds an image to the cache. More...
 
static Texture2D Get (string address)
 Gets a named image from the cache. More...
 
static void Remove (string address)
 Removes an image from the cache. More...
 
static void Clear ()
 Clears the cache of all its contents. More...
 

Static Private Attributes

static Dictionary< string,
Texture2D > 
Lookup =new Dictionary<string,Texture2D>()
 The set of all cached textures. More...
 

Member Function Documentation

static void ImageCache.Add ( string  address,
Texture2D  image 
)
inlinestatic

Adds an image to the cache.

Parameters
addressThe name to use to find your image.
imageThe image to store in the cache.
static void ImageCache.Clear ( )
inlinestatic

Clears the cache of all its contents.

static Texture2D ImageCache.Get ( string  address)
inlinestatic

Gets a named image from the cache.

Parameters
addressThe name of the image to find.
Returns
A Texture2D if it's found; null otherwise.
static void ImageCache.Remove ( string  address)
inlinestatic

Removes an image from the cache.

Parameters
addressThe name of the image to remove.

Member Data Documentation

Dictionary<string,Texture2D> ImageCache.Lookup =new Dictionary<string,Texture2D>()
staticprivate

The set of all cached textures.