mirror of
git://projects.qi-hardware.com/gmenu2x.git
synced 2025-01-12 23:10:15 +02:00
IconButton: header cleanup.
This commit is contained in:
parent
62facf4dc7
commit
cfd294b9ae
@ -1,4 +1,6 @@
|
||||
#include "iconbutton.h"
|
||||
|
||||
#include "asfont.h"
|
||||
#include "gmenu2x.h"
|
||||
#include "surface.h"
|
||||
|
||||
|
@ -2,28 +2,16 @@
|
||||
#define ICONBUTTON_H
|
||||
|
||||
#include "button.h"
|
||||
#include "asfont.h"
|
||||
|
||||
#include <string>
|
||||
|
||||
using std::string;
|
||||
|
||||
class GMenu2X;
|
||||
class Surface;
|
||||
|
||||
class IconButton : public Button {
|
||||
protected:
|
||||
GMenu2X *gmenu2x;
|
||||
string icon, label;
|
||||
void recalcSize();
|
||||
SDL_Rect iconRect, labelRect;
|
||||
|
||||
Surface *iconSurface;
|
||||
|
||||
void updateSurfaces();
|
||||
|
||||
public:
|
||||
IconButton(GMenu2X *gmenu2x, const string &icon, const string &label="");
|
||||
IconButton(GMenu2X *gmenu2x, const std::string &icon,
|
||||
const std::string &label="");
|
||||
virtual ~IconButton() {};
|
||||
|
||||
virtual void paint();
|
||||
@ -32,6 +20,16 @@ public:
|
||||
virtual void setPosition(int x, int y);
|
||||
|
||||
void setAction(ButtonAction action);
|
||||
|
||||
private:
|
||||
void updateSurfaces();
|
||||
|
||||
GMenu2X *gmenu2x;
|
||||
std::string icon, label;
|
||||
void recalcSize();
|
||||
SDL_Rect iconRect, labelRect;
|
||||
|
||||
Surface *iconSurface;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user