From bf9bccc30a186e338f96c230a4f63cc924c77bd8 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 14 Jun 2011 23:23:30 +0300 Subject: Add ability to add comments to any players. --- src/gui/popupmenu.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'src/gui/popupmenu.h') diff --git a/src/gui/popupmenu.h b/src/gui/popupmenu.h index 976e3e5d2..50d86ff37 100644 --- a/src/gui/popupmenu.h +++ b/src/gui/popupmenu.h @@ -65,6 +65,24 @@ class RenameListener : public gcn::ActionListener TextDialog *mDialog; }; +class PlayerListener : public gcn::ActionListener +{ + public: + PlayerListener(); + + void action(const gcn::ActionEvent &event); + + void setNick(std::string name) + { mNick = name; } + + void setDialog(TextDialog *dialog) + { mDialog = dialog; } + + private: + std::string mNick; + TextDialog *mDialog; +}; + /** * Window showing popup menu. */ @@ -149,6 +167,7 @@ class PopupMenu : public Popup, public LinkHandler TextCommand *mSpell; Window *mWindow; RenameListener mRenameListener; + PlayerListener mPlayerListener; TextDialog *mDialog; Button *mButton; std::string mNick; -- cgit v1.2.3-70-g09d2