3 #include "TextureEntity.h" 4 #include "MiscEntity.h" 16 string ToScript(
int index,
int option=0);
18 void SetElement(
TextureEntity* pTexture,
const RECT* prcTexture=NULL,
Color defaultTextureColor=0xffffffff );
30 asset_ptr<TextureEntity> pTexture;
40 string ToScript(
int index,
int option=0);
84 asset_ptr<SpriteFontEntity> pFont;
94 vector<GUIFontElement> m_fonts;
95 vector<GUITextureElement> m_textures;
97 map<string,DWORD> fontmap;
98 map<string,DWORD> texturemap;
99 size_t TextureSize(){
return m_textures.size();}
100 size_t FontSize(){
return m_fonts.size();}
145 ONE_ELEMENT,NINE_ELEMENT };
151 vector<RECT> DrawingRects;
156 eNormal.init();ePressed.init();eHighlight.init();
160 void AddElement(
const GUIFontElement* pElement,
const char* name=NULL);
167 string ToScript(
int option=0);
170 enum GUIResourceState
172 GUIResourceState_Normal,
173 GUIResourceState_Pressed,
174 GUIResourceState_Highlight,
175 GUIResourceState_Disabled,
188 enum GUI_RESOURCE_TYPE{
189 NONE=0, BUTTON, CONTAINER, TEXT, EDITBOX, IMEEDITBOX, SCROLLBAR
191 enum GUI_RESOURCE_LAYER_ENUM{
192 LAYER_ARTWORK=0,LAYER_OVERLAY, LAYER_BACKGROUND,
213 void SetActiveLayer(
const char *layer);
220 void SetActiveLayer(GUI_RESOURCE_LAYER_ENUM nLayerID = LAYER_ARTWORK);
223 GUI_RESOURCE_LAYER_ENUM GetActiveLayer();
229 bool HasLayer(
const char *layer);
235 bool HasLayer(GUI_RESOURCE_LAYER_ENUM nLayerID = LAYER_ARTWORK);
244 GUI_RESOURCE_LAYER_ENUM GetLayerIDByName(
const char* layer=NULL);
247 void SetLayerType(
int etype);
253 void SetFont(
const char *fontname,
int index=0);
254 void SetFontColor(DWORD color,
int index=0);
255 void SetFontFormat(DWORD dwFormat,
int index=0);
256 void SetFontTransparency(DWORD transparency,
int index=0);
258 void SetTexture(
const char *fontname,
int index=0);
259 void SetTextureColor(DWORD color,
int index=0);
260 void SetTextureTransparency(DWORD transparency,
int index=0);
268 virtual void Clone(
IObject *pobj)
const;
270 virtual int Release();
271 virtual bool Equals(
const IObject *obj)
const;
272 void SetDrawingRects(
RECT *rcDest,
int index=0);
274 RECT GetDrawingRects(
int index=0)
const;
282 void CloneState(
const char * statename);
285 void AddElement(
const GUIFontElement* pElement,
const char* name=NULL);
299 void SetCurrentState(
const char* statename=NULL);
300 void SetCurrentState(GUIResourceState state);
301 GUIResourceState GetCurrentState() {
return m_CurrentState;};
302 size_t TextureSize(){
return m_pActiveLayer->eCurrent->TextureSize();}
303 size_t FontSize(){
return m_pActiveLayer->eCurrent->FontSize();}
306 string ToScript(
int option=0);
316 GUIResourceState m_CurrentState;
Which DXT Compression to Use? Obviously, there are some trade-offs between the different formats whic...
Definition: TextureEntity.h:29
void GetRect(RECT *pOut)
get bounding rect of this element on the composite texture
Definition: GUIResource.cpp:49
different physics engine has different winding order.
Definition: EventBinding.h:32
Definition: ManagedDef.h:18
A GUI layer contains four drawable GUIStateElement, which are "normal", "highlight", "pressed", and "disabled".
Definition: GUIResource.h:131
base class for object, such as CBaseObject, IAttributeObject, GUI object.
Definition: PERef.h:287
a texture from a rectangular region of bitmap, and one additional texture color
Definition: GUIResource.h:12
Each GUI control is associated with a CGUIResource object for rendering.
Definition: GUIResource.h:185
a font name, format and font color
Definition: GUIResource.h:36
A drawable element containing several textures and fonts, which can be retrieved by name or index...
Definition: GUIResource.h:92
A linear, 32-bit/component floating point RGBA color.
Definition: ParaColor.h:12
Definition: ParaColor.h:275
Definition: SpriteFontEntity.h:26