summaryrefslogtreecommitdiff
path: root/src/gui/trade.cpp
diff options
context:
space:
mode:
authorBjörn Steinbrink <B.Steinbrink@gmx.de>2006-03-09 02:02:57 +0000
committerBjörn Steinbrink <B.Steinbrink@gmx.de>2006-03-09 02:02:57 +0000
commit81cf85e9ec1d37dc6e8dd9883f42bb50dace9135 (patch)
tree585415bbb85c48fc8fb83cd5f54e1cfe8e988ee7 /src/gui/trade.cpp
parent78ab0ec914d3c5a97f162905afb3dede53f8b9ed (diff)
downloadmana-81cf85e9ec1d37dc6e8dd9883f42bb50dace9135.tar.gz
mana-81cf85e9ec1d37dc6e8dd9883f42bb50dace9135.tar.bz2
mana-81cf85e9ec1d37dc6e8dd9883f42bb50dace9135.tar.xz
mana-81cf85e9ec1d37dc6e8dd9883f42bb50dace9135.zip
Made the Button ctor accept eventId and action listener.
Diffstat (limited to 'src/gui/trade.cpp')
-rw-r--r--src/gui/trade.cpp18
1 files changed, 4 insertions, 14 deletions
diff --git a/src/gui/trade.cpp b/src/gui/trade.cpp
index 9d10774b..370b5410 100644
--- a/src/gui/trade.cpp
+++ b/src/gui/trade.cpp
@@ -51,10 +51,10 @@ TradeWindow::TradeWindow(Network *network):
{
setContentSize(322, 150);
- addButton = new Button("Add");
- okButton = new Button("Ok");
- cancelButton = new Button("Cancel");
- tradeButton = new Button("Trade");
+ addButton = new Button("Add", "add", this);
+ okButton = new Button("Ok", "ok", this);
+ cancelButton = new Button("Cancel", "cancel", this);
+ tradeButton = new Button("Trade", "trade", this);
myItemContainer = new ItemContainer(myInventory.get());
myItemContainer->setPosition(2, 2);
@@ -72,21 +72,11 @@ TradeWindow::TradeWindow(Network *network):
moneyLabel2 = new gcn::Label("You give:");
moneyField = new TextField();
- addButton->setEventId("add");
- okButton->setEventId("ok");
- cancelButton->setEventId("cancel");
- tradeButton->setEventId("trade");
-
addButton->adjustSize();
okButton->adjustSize();
cancelButton->adjustSize();
tradeButton->adjustSize();
- addButton->addActionListener(this);
- okButton->addActionListener(this);
- cancelButton->addActionListener(this);
- tradeButton->addActionListener(this);
-
tradeButton->setEnabled(false);
itemNameLabel = new gcn::Label("Name:");