diff options
author | Andrei Karas <akaras@inbox.ru> | 2011-03-26 05:07:12 +0200 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2011-03-26 05:50:44 +0200 |
commit | 8403dcf857c9cc639e8162edd5d4df4af07274bc (patch) | |
tree | 2f127213e0df4691b06c549a8f20b3d5225b9220 /src/gui/widgets/button.h | |
parent | fc24490f1ecd186f3c294915fadee62c3053d841 (diff) | |
download | plus-8403dcf857c9cc639e8162edd5d4df4af07274bc.tar.gz plus-8403dcf857c9cc639e8162edd5d4df4af07274bc.tar.bz2 plus-8403dcf857c9cc639e8162edd5d4df4af07274bc.tar.xz plus-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.h | 13 |
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 |