diff options
author | David Athay <ko2fan@gmail.com> | 2009-01-13 12:48:36 +0000 |
---|---|---|
committer | Ira Rice <irarice@gmail.com> | 2009-01-20 10:54:07 -0700 |
commit | 088ccc74d9b8695c906eaabae8e4019ebf55c83c (patch) | |
tree | 8054c8531d721a7555b2c2b46c7b43adbad9b9d2 /src/gui/chat.h | |
parent | 114559b98b7e8c94b1d84d4d450309fd16ed2a38 (diff) | |
download | mana-088ccc74d9b8695c906eaabae8e4019ebf55c83c.tar.gz mana-088ccc74d9b8695c906eaabae8e4019ebf55c83c.tar.bz2 mana-088ccc74d9b8695c906eaabae8e4019ebf55c83c.tar.xz mana-088ccc74d9b8695c906eaabae8e4019ebf55c83c.zip |
Added WoW style item adding to chat window. Right click, then left
clicking on add to chat to put the item in the chat input. Left click
the item link to show a popup description, and click the link again to
remove the popup.
Diffstat (limited to 'src/gui/chat.h')
-rw-r--r-- | src/gui/chat.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/gui/chat.h b/src/gui/chat.h index f7d05df1..03b2062a 100644 --- a/src/gui/chat.h +++ b/src/gui/chat.h @@ -38,6 +38,7 @@ class Network; class Recorder; class Party; class ScrollArea; +class ItemLinkHandler; #define BY_GM 0 // those should be self-explanatory =) #define BY_PLAYER 1 @@ -185,6 +186,9 @@ class ChatWindow : public Window, public gcn::ActionListener, /** Called to set current text */ void setInputText(std::string input_str); + /** Called to add item to chat */ + void addItemText(int itemid, const std::string &item); + /** Override to reset mTmpVisible */ void setVisible(bool visible); @@ -234,7 +238,8 @@ class ChatWindow : public Window, public gcn::ActionListener, gcn::TextField *mChatInput; /**< Input box for typing chat messages */ BrowserBox *mTextOutput; /**< Text box for displaying chat history */ ScrollArea *mScrollArea; /**< Scroll area around text output */ - + ItemLinkHandler *mItemLinkHandler; /** Used for showing item popup on + clicking links **/ typedef std::list<std::string> History; typedef History::iterator HistoryIterator; History mHistory; /**< Command history */ |