summaryrefslogtreecommitdiff
path: root/src/gui/widgets/characterdisplay.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/widgets/characterdisplay.h')
-rw-r--r--src/gui/widgets/characterdisplay.h24
1 files changed, 18 insertions, 6 deletions
diff --git a/src/gui/widgets/characterdisplay.h b/src/gui/widgets/characterdisplay.h
index 5c602b4f9..c7302ef48 100644
--- a/src/gui/widgets/characterdisplay.h
+++ b/src/gui/widgets/characterdisplay.h
@@ -29,12 +29,17 @@
#include "net/charserverhandler.h"
#include "net/net.h"
+#include <guichan/widgetlistener.hpp>
+
class Button;
class CharSelectDialog;
class Label;
class PlayerBox;
+class TextPopup;
-class CharacterDisplay final : public Container
+class CharacterDisplay final : public Container,
+ public gcn::MouseListener,
+ public gcn::WidgetListener
{
public:
CharacterDisplay(const Widget2 *const widget,
@@ -42,6 +47,8 @@ class CharacterDisplay final : public Container
A_DELETE_COPY(CharacterDisplay)
+ virtual ~CharacterDisplay();
+
void setCharacter(Net::Character *const character);
Net::Character *getCharacter() const
@@ -58,15 +65,19 @@ class CharacterDisplay final : public Container
{ return false; }
void focusSelect()
- { }
+ { }
void focusDelete()
- { }
+ { }
void setSelect(bool b)
- {
- mPlayerBox->setSelected(b);
- }
+ { mPlayerBox->setSelected(b); }
+
+ void widgetHidden(const gcn::Event &event) override;
+
+ void mouseExited(gcn::MouseEvent &event) override;
+
+ void mouseMoved(gcn::MouseEvent &event) override;
private:
void update();
@@ -74,6 +85,7 @@ class CharacterDisplay final : public Container
Net::Character *mCharacter;
PlayerBox *mPlayerBox;
Label *mName;
+ TextPopup *mPopup;
};
#endif