tibia-client/src/framework/ui/uibuttonskin.h

32 lines
620 B
C
Raw Normal View History

2011-04-09 21:08:43 +02:00
#ifndef UIBUTTONSKIN_H
#define UIBUTTONSKIN_H
2011-07-13 23:12:36 +02:00
#include <global.h>
2011-04-17 21:14:24 +02:00
#include <ui/uielementskin.h>
2011-04-09 21:08:43 +02:00
2011-04-11 22:06:03 +02:00
class Font;
2011-07-17 02:13:53 +02:00
struct UIButtonStateSkin {
ImagePtr image;
Point textTranslate;
Color textColor;
};
typedef boost::shared_ptr<UIButtonStateSkin> UIButtonStateSkinPtr;
2011-04-09 21:08:43 +02:00
class UIButtonSkin : public UIElementSkin
{
public:
2011-04-10 02:51:35 +02:00
UIButtonSkin(const std::string& name) :
UIElementSkin(name, UI::Button) { }
2011-04-09 21:08:43 +02:00
2011-07-13 23:12:36 +02:00
void load(OTMLNode* node);
2011-07-17 02:13:53 +02:00
UIButtonStateSkinPtr loadStateSkin(OTMLNode* node);
2011-04-09 21:08:43 +02:00
void draw(UIElement *element);
private:
2011-07-17 02:13:53 +02:00
UIButtonStateSkinPtr m_statesSkin[3];
2011-04-09 21:08:43 +02:00
};
#endif // UIBUTTONSKIN_H