From b03435fd4ad3c19b96dd7ae960e0950fdd35392c Mon Sep 17 00:00:00 2001 From: Bjørn Lindeijer Date: Sun, 7 Dec 2008 00:23:59 +0100 Subject: Fixed wrapping in some cases, removed draw method MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The 'draw' method was confusingly named, and was actually for updating the GUI after a resize. Its functionality has been merged into 'widgetResized'. The wrapping was broken in the case where text was added to the NPC dialog, cause it was added to an already wrapped string, causing the wrapping to become permanent. Sorry for all the reformatting. Signed-off-by: Bjørn Lindeijer --- src/gui/npc_text.h | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) (limited to 'src/gui/npc_text.h') diff --git a/src/gui/npc_text.h b/src/gui/npc_text.h index e26dd870..b647b9a1 100644 --- a/src/gui/npc_text.h +++ b/src/gui/npc_text.h @@ -56,24 +56,17 @@ class NpcTextDialog : public Window, public gcn::ActionListener */ void widgetResized(const gcn::Event &event); - /** - * Redraws the window - */ - void draw(); - /** * Called when receiving actions from the widgets. */ - void - action(const gcn::ActionEvent &event); + void action(const gcn::ActionEvent &event); /** * Sets the text shows in the dialog. * * @param string The new text. */ - void - setText(const std::string &string); + void setText(const std::string &string); /** * Adds the text to the text shows in the dialog. Also adds a newline @@ -81,8 +74,7 @@ class NpcTextDialog : public Window, public gcn::ActionListener * * @param string The text to add. */ - void - addText(const std::string &string); + void addText(const std::string &string); private: gcn::Button *okButton; @@ -92,4 +84,4 @@ class NpcTextDialog : public Window, public gcn::ActionListener std::string mText; }; -#endif +#endif // _TMW_NPC_TEXT_H -- cgit v1.2.3-70-g09d2