iconbutton: Cache icon surface instead of doing serveral hashtable lookups per

frame
This commit is contained in:
Lars-Peter Clausen committed 2010-05-02 14:52:46 +02:00
1 parent 40a26e1a9c
commit 28d3fc9ece
2 files changed
+21 -8

No files matched your search

+5
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;