mirror of
git://projects.qi-hardware.com/gmenu2x.git
synced 2025-04-21 12:27:27 +03:00
iconbutton: Cache icon surface instead of doing serveral hashtable lookups per
frame
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
using std::string;
|
||||
|
||||
class GMenu2X;
|
||||
class Surface;
|
||||
|
||||
class IconButton : public Button {
|
||||
protected:
|
||||
@@ -16,6 +17,10 @@ protected:
|
||||
void recalcSize();
|
||||
SDL_Rect iconRect, labelRect;
|
||||
|
||||
Surface *iconSurface;
|
||||
|
||||
void updateSurfaces();
|
||||
|
||||
public:
|
||||
static const int DISP_RIGHT = 0;
|
||||
static const int DISP_LEFT = 1;
|
||||
|
||||
Reference in New Issue
Block a user