From 088ccc74d9b8695c906eaabae8e4019ebf55c83c Mon Sep 17 00:00:00 2001 From: David Athay Date: Tue, 13 Jan 2009 12:48:36 +0000 Subject: 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. --- src/gui/chat.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/gui/chat.h') 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 History; typedef History::iterator HistoryIterator; History mHistory; /**< Command history */ -- cgit v1.2.3-60-g2f50