summaryrefslogtreecommitdiff
path: root/src/gui/widgets/button.h
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-03-26 05:07:12 +0200
committerAndrei Karas <akaras@inbox.ru>2011-03-26 05:50:44 +0200
commit8403dcf857c9cc639e8162edd5d4df4af07274bc (patch)
tree2f127213e0df4691b06c549a8f20b3d5225b9220 /src/gui/widgets/button.h
parentfc24490f1ecd186f3c294915fadee62c3053d841 (diff)
downloadManaVerse-8403dcf857c9cc639e8162edd5d4df4af07274bc.tar.gz
ManaVerse-8403dcf857c9cc639e8162edd5d4df4af07274bc.tar.bz2
ManaVerse-8403dcf857c9cc639e8162edd5d4df4af07274bc.tar.xz
ManaVerse-8403dcf857c9cc639e8162edd5d4df4af07274bc.zip
Precalculation vertexes for improving draw speed.
Implemented in Software and fast OpenGL backends. Not all controls using this mode because some limitations. Known issue: impossible compile without opengl. Will be fixed in next commits.
Diffstat (limited to 'src/gui/widgets/button.h')
-rw-r--r--src/gui/widgets/button.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/gui/widgets/button.h b/src/gui/widgets/button.h
index e7446cd26..8c43b6ddd 100644
--- a/src/gui/widgets/button.h
+++ b/src/gui/widgets/button.h
@@ -25,7 +25,9 @@
#include <guichan/widgets/button.hpp>
#include <guichan/mouseevent.hpp>
+#include <guichan/widgetlistener.hpp>
+class GraphicsVertexes;
class ImageRect;
/**
@@ -33,7 +35,7 @@ class ImageRect;
*
* \ingroup GUI
*/
-class Button : public gcn::Button
+class Button : public gcn::Button, public gcn::WidgetListener
{
public:
/**
@@ -80,6 +82,10 @@ class Button : public gcn::Button
int getTag()
{ return mTag; }
+ void widgetResized(const gcn::Event &event);
+
+ void widgetMoved(const gcn::Event &event);
+
private:
void init();
@@ -90,6 +96,11 @@ class Button : public gcn::Button
std::string mDescription;
unsigned mClickCount;
int mTag;
+ GraphicsVertexes *mVertexes;
+ bool mRedraw;
+ int mMode;
+ int mXOffset;
+ int mYOffset;
};
#endif