My Project
Public Member Functions | Public Attributes | List of all members
ParaEngine::GUIStateElement Struct Reference

A drawable element containing several textures and fonts, which can be retrieved by name or index. More...

#include <GUIResource.h>

Public Member Functions

size_t TextureSize ()
 
size_t FontSize ()
 
GUIFontElementAddElement (const GUIFontElement *pElement, const char *name=NULL)
 Currently, if you add elements using the same several times, the old ones will not be deleted. More...
 
GUITextureElementAddElement (const GUITextureElement *pElement, const char *name=NULL)
 
GUITextureElementSetElement (const GUITextureElement *pElement, int nIndex)
 create or replace an element at the given index. More...
 
GUIFontElementSetElement (const GUIFontElement *pElement, int nIndex)
 create or replace an element at the given index. More...
 
GUIFontElementGetFontElement (const string &name)
 
GUIFontElementGetFontElement (int index)
 
GUITextureElementGetTextureElement (const string &name)
 
GUITextureElementGetTextureElement (int index)
 
void init ()
 
void Clone (GUIStateElement *output)
 

Public Attributes

map< string, DWORD > fontmap
 
map< string, DWORD > texturemap
 

Detailed Description

A drawable element containing several textures and fonts, which can be retrieved by name or index.

typically an element may contain one texture for traditional button, or 9 textures for re-sizable controls

Member Function Documentation

§ AddElement()

GUIFontElement * ParaEngine::GUIStateElement::AddElement ( const GUIFontElement pElement,
const char *  name = NULL 
)

Currently, if you add elements using the same several times, the old ones will not be deleted.

If you want to get the element with that name, you get the last added one.

§ SetElement() [1/2]

GUITextureElement * ParaEngine::GUIStateElement::SetElement ( const GUITextureElement pElement,
int  nIndex 
)

create or replace an element at the given index.

it is a better to call this with increasing nIndex

§ SetElement() [2/2]

GUIFontElement * ParaEngine::GUIStateElement::SetElement ( const GUIFontElement pElement,
int  nIndex 
)

create or replace an element at the given index.

it is a better to call this with increasing nIndex


The documentation for this struct was generated from the following files: