summaryrefslogtreecommitdiff
path: root/src/gui/npclistdialog.h
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2008-12-07 00:23:59 +0100
committerIra Rice <irarice@gmail.com>2008-12-06 17:04:08 -0700
commitb03435fd4ad3c19b96dd7ae960e0950fdd35392c (patch)
treed7c058f3383e6f212542409a5ecf7247aa1cd966 /src/gui/npclistdialog.h
parent1eaa9ddf23eefebd4e48d6019df3fe3ddc94dee0 (diff)
downloadmana-b03435fd4ad3c19b96dd7ae960e0950fdd35392c.tar.gz
mana-b03435fd4ad3c19b96dd7ae960e0950fdd35392c.tar.bz2
mana-b03435fd4ad3c19b96dd7ae960e0950fdd35392c.tar.xz
mana-b03435fd4ad3c19b96dd7ae960e0950fdd35392c.zip
Fixed wrapping in some cases, removed draw method
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 <bjorn@lindeijer.nl>
Diffstat (limited to 'src/gui/npclistdialog.h')
-rw-r--r--src/gui/npclistdialog.h22
1 files changed, 6 insertions, 16 deletions
diff --git a/src/gui/npclistdialog.h b/src/gui/npclistdialog.h
index 77f0c177..04c5c4d9 100644
--- a/src/gui/npclistdialog.h
+++ b/src/gui/npclistdialog.h
@@ -58,41 +58,31 @@ class NpcListDialog : 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);
/**
* Returns the number of items in the choices list.
*/
- int
- getNumberOfElements();
+ int getNumberOfElements();
/**
* Returns the name of item number i of the choices list.
*/
- std::string
- getElementAt(int i);
+ std::string getElementAt(int i);
/**
* Fills the options list for an NPC dialog.
*
* @param itemString A string with the options separated with colons.
*/
- void
- parseItems(const std::string &itemString);
+ void parseItems(const std::string &itemString);
/**
* Resets the list by removing all items.
*/
- void
- reset();
+ void reset();
private:
gcn::ListBox *mItemList;
@@ -103,4 +93,4 @@ class NpcListDialog : public Window, public gcn::ActionListener,
std::vector<std::string> mItems;
};
-#endif
+#endif // _TMW_GUI_NPCLISTDIALOG_H