Mercurial > LightClone
view LightClone/Source/GuiLabel.h @ 18:33cb6979ac51
More work on GUI system
author | koryspansel |
---|---|
date | Wed, 14 Sep 2011 17:24:49 -0700 |
parents | 4951acfe92fc |
children | 3a63df04f3c0 |
line wrap: on
line source
/* * GuiLabel */ #ifndef __GUILABEL_H__ #define __GUILABEL_H__ #include "Core.h" #include "GuiElement.h" /* * GuiLabelFlag */ enum { GuiLabelFlag_CenterX = (1 << 0), GuiLabelFlag_CenterY = (1 << 1), }; /* * GuiLabel */ class GuiLabel : public GuiElement { /* * MaximumLabelLength */ static const uint32 MaximumLabelLength = 32; /* * pResourceManager */ ResourceManager* pResourceManager; /* * pFont */ ID3DXFont* pFont; /* * kLabel */ char kLabel[MaximumLabelLength]; /* * nFlags */ uint32 nFlags; /* * kColor */ D3DCOLOR kColor; public: /* * GuiLabel */ GuiLabel(); /* * Initialize */ virtual ErrorCode Initialize(ResourceManager* pResourceManager); /* * Terminate */ virtual void Terminate(); /* * Update */ virtual void Update(float fElapsed); /* * Render */ virtual void Render(RenderContext& kContext, Camera& kCamera); /* * SetFont */ ErrorCode SetFont(const char* pName, uint32 nSize, uint32 nHeight = FW_NORMAL); /* * SetText */ ErrorCode SetText(const char* pText); /* * SetFlags */ ErrorCode SetFlags(uint32 nFlags); /* * ClearFlags */ ErrorCode ClearFlags(uint32 nFlags); }; #endif //__GUILABEL_H__