summaryrefslogtreecommitdiff
path: root/src/gui/itemamount.h
diff options
context:
space:
mode:
authorJared Adams <jaxad0127@gmail.com>2009-05-06 16:34:06 -0600
committerJared Adams <jaxad0127@gmail.com>2009-05-06 16:36:11 -0600
commit574ef501d32c7735d2aed022f2a3761d053bbe7c (patch)
treeca5dd0709d6a0d1989af3fab6b1f85c6726a2fb0 /src/gui/itemamount.h
parent3603521356ad1646d456a1681ff9f8a7c88ab458 (diff)
downloadmana-client-574ef501d32c7735d2aed022f2a3761d053bbe7c.tar.gz
mana-client-574ef501d32c7735d2aed022f2a3761d053bbe7c.tar.bz2
mana-client-574ef501d32c7735d2aed022f2a3761d053bbe7c.tar.xz
mana-client-574ef501d32c7735d2aed022f2a3761d053bbe7c.zip
Clean up the bypass code for the ItemAmountWindow
Diffstat (limited to 'src/gui/itemamount.h')
-rw-r--r--src/gui/itemamount.h17
1 files changed, 11 insertions, 6 deletions
diff --git a/src/gui/itemamount.h b/src/gui/itemamount.h
index 94ca8dc2..33d6d816 100644
--- a/src/gui/itemamount.h
+++ b/src/gui/itemamount.h
@@ -45,12 +45,6 @@ class ItemAmountWindow : public Window, public gcn::ActionListener
};
/**
- * Constructor.
- */
- ItemAmountWindow(Usage usage, Window *parent, Item *item,
- int maxRange = 0);
-
- /**
* Called when receiving actions from widget.
*/
void action(const gcn::ActionEvent &event);
@@ -65,7 +59,18 @@ class ItemAmountWindow : public Window, public gcn::ActionListener
*/
void close();
+ /**
+ * Creates the dialog, or bypass it if there aren't enough items.
+ */
+ static void showWindow(Usage usage, Window *parent, Item *item,
+ int maxRange = 0);
+
private:
+ static void finish(Item *item, int amount, Usage usage);
+
+ ItemAmountWindow(Usage usage, Window *parent, Item *item,
+ int maxRange = 0);
+
gcn::Label *mItemAmountLabel; /**< Item amount caption. */
Item *mItem;