summaryrefslogtreecommitdiff
path: root/src/gui/item_amount.cpp
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2007-01-14 14:54:39 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2007-01-14 14:54:39 +0000
commitf842e0b40d8382011f0bc46b1446945d99ac0425 (patch)
tree5ddbb7c146a8ece28a4260d788350b1c2cf0dbed /src/gui/item_amount.cpp
parentcbbcc5489e2f72a76b66ae849cbe8f1dc44246ca (diff)
downloadmana-client-f842e0b40d8382011f0bc46b1446945d99ac0425.tar.gz
mana-client-f842e0b40d8382011f0bc46b1446945d99ac0425.tar.bz2
mana-client-f842e0b40d8382011f0bc46b1446945d99ac0425.tar.xz
mana-client-f842e0b40d8382011f0bc46b1446945d99ac0425.zip
Upgraded to Guichan 0.6.0 (merge from guichan-0.6.0 branch).
Diffstat (limited to 'src/gui/item_amount.cpp')
-rw-r--r--src/gui/item_amount.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/gui/item_amount.cpp b/src/gui/item_amount.cpp
index afc3ac44..f72462f9 100644
--- a/src/gui/item_amount.cpp
+++ b/src/gui/item_amount.cpp
@@ -49,7 +49,7 @@ ItemAmountWindow::ItemAmountWindow(int usage, Window *parent, Item *item):
mItemAmountSlide->setDimension(gcn::Rectangle(5, 120, 180, 10));
// Set button events Id
- mItemAmountSlide->setEventId("Slide");
+ mItemAmountSlide->setActionEventId("Slide");
// Set position
mItemAmountTextBox->setPosition(35, 10);
@@ -75,11 +75,11 @@ ItemAmountWindow::ItemAmountWindow(int usage, Window *parent, Item *item):
switch (usage) {
case AMOUNT_TRADE_ADD:
setCaption("Select amount of items to trade.");
- okButton->setEventId("AddTrade");
+ okButton->setActionEventId("AddTrade");
break;
case AMOUNT_ITEM_DROP:
setCaption("Select amount of items to drop.");
- okButton->setEventId("Drop");
+ okButton->setActionEventId("Drop");
break;
default:
break;
@@ -95,33 +95,33 @@ void ItemAmountWindow::resetAmount()
mItemAmountTextBox->setInt(1);
}
-void ItemAmountWindow::action(const std::string& eventId, gcn::Widget* widget)
+void ItemAmountWindow::action(const gcn::ActionEvent &event)
{
int amount = mItemAmountTextBox->getInt();
- if (eventId == "Cancel")
+ if (event.getId() == "Cancel")
{
scheduleDelete();
}
- else if (eventId == "Drop")
+ else if (event.getId() == "Drop")
{
player_node->dropItem(mItem, mItemAmountTextBox->getInt());
scheduleDelete();
}
- else if (eventId == "AddTrade")
+ else if (event.getId() == "AddTrade")
{
tradeWindow->tradeItem(mItem, mItemAmountTextBox->getInt());
scheduleDelete();
}
- else if (eventId == "Plus")
+ else if (event.getId() == "Plus")
{
amount++;
}
- else if (eventId == "Minus")
+ else if (event.getId() == "Minus")
{
amount--;
}
- else if (eventId == "Slide")
+ else if (event.getId() == "Slide")
{
amount = static_cast<int>(mItemAmountSlide->getValue());
}