From 8403dcf857c9cc639e8162edd5d4df4af07274bc Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sat, 26 Mar 2011 05:07:12 +0200 Subject: 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. --- src/gui/widgets/button.h | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'src/gui/widgets/button.h') 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 #include +#include +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 -- cgit v1.2.3-70-g09d2