1
0
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:
Lars-Peter Clausen
2010-05-02 14:52:46 +02:00
parent 40a26e1a9c
commit 28d3fc9ece
2 changed files with 21 additions and 8 deletions

View File

@@ -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;