summaryrefslogtreecommitdiff
path: root/src/gui/windowmenu.h
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-03-28 22:42:38 +0300
committerAndrei Karas <akaras@inbox.ru>2012-03-28 22:42:38 +0300
commitf474ad785704a904fd2b95d56fa67cccf69c876f (patch)
tree5972ee1355919021f332194cd3ea28d13437e00e /src/gui/windowmenu.h
parent930eeae09a3a7dc31c047d199c77ef9e284d37ba (diff)
downloadmanaverse-f474ad785704a904fd2b95d56fa67cccf69c876f.tar.gz
manaverse-f474ad785704a904fd2b95d56fa67cccf69c876f.tar.bz2
manaverse-f474ad785704a904fd2b95d56fa67cccf69c876f.tar.xz
manaverse-f474ad785704a904fd2b95d56fa67cccf69c876f.zip
Add option to autohide buttons on top right corner.
By default buttons hidden.
Diffstat (limited to 'src/gui/windowmenu.h')
-rw-r--r--src/gui/windowmenu.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/gui/windowmenu.h b/src/gui/windowmenu.h
index 8abc5e87a..7bb9aa549 100644
--- a/src/gui/windowmenu.h
+++ b/src/gui/windowmenu.h
@@ -23,6 +23,8 @@
#ifndef WINDOWMENU_H
#define WINDOWMENU_H
+#include "configlistener.h"
+
#include "gui/widgets/container.h"
#include "gui/widgets/button.h"
@@ -44,12 +46,14 @@ class TextPopup;
* \ingroup Interface
*/
class WindowMenu : public Container,
+ public ConfigListener,
public gcn::ActionListener,
public gcn::SelectionListener,
public gcn::MouseListener
{
public:
WindowMenu();
+
~WindowMenu();
void action(const gcn::ActionEvent &event);
@@ -74,6 +78,10 @@ class WindowMenu : public Container,
void saveButtons();
+ void drawChildren(gcn::Graphics* graphics);
+
+ void optionChanged(const std::string &name);
+
private:
inline void addButton(const char* text, std::string description,
int &x, int &h, int key);
@@ -84,6 +92,8 @@ class WindowMenu : public Container,
TextPopup *mTextPopup;
std::vector <gcn::Button*> mButtons;
std::map <std::string, gcn::Button*> mButtonNames;
+ bool mHaveMouse;
+ bool mAutoHide;
};
extern WindowMenu *windowMenu;