summaryrefslogtreecommitdiff
path: root/src/gui/widgets/popup.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/popup.h
parentfc24490f1ecd186f3c294915fadee62c3053d841 (diff)
downloadmv-8403dcf857c9cc639e8162edd5d4df4af07274bc.tar.gz
mv-8403dcf857c9cc639e8162edd5d4df4af07274bc.tar.bz2
mv-8403dcf857c9cc639e8162edd5d4df4af07274bc.tar.xz
mv-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/popup.h')
-rw-r--r--src/gui/widgets/popup.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/gui/widgets/popup.h b/src/gui/widgets/popup.h
index 302e55656..963477fbb 100644
--- a/src/gui/widgets/popup.h
+++ b/src/gui/widgets/popup.h
@@ -30,6 +30,7 @@
#include "gui/widgets/container.h"
#include <guichan/mouselistener.hpp>
+#include <guichan/widgetlistener.hpp>
#ifdef __GNUC__
#define _UNUSED_ __attribute__ ((unused))
@@ -37,6 +38,7 @@
#define _UNUSED_
#endif
+class GraphicsVertexes;
class Skin;
class WindowContainer;
@@ -52,7 +54,8 @@ class WindowContainer;
*
* \ingroup GUI
*/
-class Popup : public Container, public gcn::MouseListener
+class Popup : public Container, public gcn::MouseListener,
+ public gcn::WidgetListener
{
public:
/**
@@ -161,6 +164,10 @@ class Popup : public Container, public gcn::MouseListener
void hide();
+ void widgetResized(const gcn::Event &event);
+
+ void widgetMoved(const gcn::Event &event);
+
private:
std::string mPopupName; /**< Name of the popup */
int mMinWidth; /**< Minimum popup width */
@@ -170,6 +177,8 @@ class Popup : public Container, public gcn::MouseListener
int mPadding; /**< Holds the padding of the popup. */
Skin *mSkin; /**< Skin in use by this popup */
+ GraphicsVertexes *mVertexes;
+ bool mRedraw;
};
#endif