summaryrefslogtreecommitdiff
path: root/src/gui/item_amount.cpp
diff options
context:
space:
mode:
authorBjörn Steinbrink <B.Steinbrink@gmx.de>2005-10-20 09:01:12 +0000
committerBjörn Steinbrink <B.Steinbrink@gmx.de>2005-10-20 09:01:12 +0000
commit5acb9213cc2ee949a252a5c08a9a9a13542b94d5 (patch)
tree40d29fd38eeb692ec948c69f15f5ca27067fa7fb /src/gui/item_amount.cpp
parent2415d3b14cdec975a28ccef46d5234f70b06d3b0 (diff)
downloadmana-5acb9213cc2ee949a252a5c08a9a9a13542b94d5.tar.gz
mana-5acb9213cc2ee949a252a5c08a9a9a13542b94d5.tar.bz2
mana-5acb9213cc2ee949a252a5c08a9a9a13542b94d5.tar.xz
mana-5acb9213cc2ee949a252a5c08a9a9a13542b94d5.zip
Various cleanups and refactorisations.
Diffstat (limited to 'src/gui/item_amount.cpp')
-rw-r--r--src/gui/item_amount.cpp44
1 files changed, 22 insertions, 22 deletions
diff --git a/src/gui/item_amount.cpp b/src/gui/item_amount.cpp
index 4620ed81..f308b7ab 100644
--- a/src/gui/item_amount.cpp
+++ b/src/gui/item_amount.cpp
@@ -41,55 +41,55 @@ ItemAmountWindow::ItemAmountWindow(int usage, Window *parent, Item *item):
mItemAmountTextBox = new IntTextBox(1);
// New buttons
- mItemAmountMinusButton = new Button("-");
- mItemAmountPlusButton = new Button("+");
+ Button *minusButton = new Button("-");
+ Button *plusButton = new Button("+");
mItemAmountSlide = new Slider(1.0);
- mItemAmountOkButton = new Button("Okay");
- mItemAmountCancelButton = new Button("Cancel");
+ Button *okButton = new Button("Okay");
+ Button *cancelButton = new Button("Cancel");
mItemAmountTextBox->setRange(1, mItem->getQuantity());
mItemAmountSlide->setDimension(gcn::Rectangle(5, 120, 180, 10));
// Set button events Id
- mItemAmountMinusButton->setEventId("Minus");
- mItemAmountPlusButton->setEventId("Plus");
+ minusButton->setEventId("Minus");
+ plusButton->setEventId("Plus");
mItemAmountSlide->setEventId("Slide");
- mItemAmountOkButton->setEventId("Drop");
- mItemAmountCancelButton->setEventId("Cancel");
+ okButton->setEventId("Drop");
+ cancelButton->setEventId("Cancel");
// Set position
mItemAmountTextBox->setPosition(35, 10);
mItemAmountTextBox->setSize(24, 16);
- mItemAmountPlusButton->setPosition(60, 5);
- mItemAmountMinusButton->setPosition(10, 5);
+ plusButton->setPosition(60, 5);
+ minusButton->setPosition(10, 5);
mItemAmountSlide->setPosition(10, 35);
- mItemAmountOkButton->setPosition(10, 50);
- mItemAmountCancelButton->setPosition(60, 50);
+ okButton->setPosition(10, 50);
+ cancelButton->setPosition(60, 50);
// Assemble
add(mItemAmountTextBox);
- add(mItemAmountPlusButton);
- add(mItemAmountMinusButton);
+ add(plusButton);
+ add(minusButton);
add(mItemAmountSlide);
- add(mItemAmountOkButton);
- add(mItemAmountCancelButton);
+ add(okButton);
+ add(cancelButton);
- mItemAmountPlusButton->addActionListener(this);
- mItemAmountMinusButton->addActionListener(this);
+ plusButton->addActionListener(this);
+ minusButton->addActionListener(this);
mItemAmountSlide->addActionListener(this);
- mItemAmountOkButton->addActionListener(this);
- mItemAmountCancelButton->addActionListener(this);
+ okButton->addActionListener(this);
+ cancelButton->addActionListener(this);
resetAmount();
switch (usage) {
case AMOUNT_TRADE_ADD:
setCaption("Select amount of items to trade.");
- mItemAmountOkButton->setEventId("AddTrade");
+ okButton->setEventId("AddTrade");
break;
case AMOUNT_ITEM_DROP:
setCaption("Select amount of items to drop.");
- mItemAmountOkButton->setEventId("Drop");
+ okButton->setEventId("Drop");
break;
default:
break;