summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2006-11-05 16:09:55 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2006-11-05 16:09:55 +0000
commit144b5224b6b96cee799dd0e0f276620ddcca7698 (patch)
treed6a8a86d0dbbe7a57807e4aa88585282137ecf41 /src
parenteaf08e0a0d6dd64102a4a2f496810728ce69ec7d (diff)
downloadmana-144b5224b6b96cee799dd0e0f276620ddcca7698.tar.gz
mana-144b5224b6b96cee799dd0e0f276620ddcca7698.tar.bz2
mana-144b5224b6b96cee799dd0e0f276620ddcca7698.tar.xz
mana-144b5224b6b96cee799dd0e0f276620ddcca7698.zip
Fixed money field to no longer hide below the bottom of the window.
Diffstat (limited to 'src')
-rw-r--r--src/CMakeLists.txt2
-rw-r--r--src/gui/trade.cpp36
2 files changed, 20 insertions, 18 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 3e4550c7..009f4fc3 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -129,6 +129,8 @@ SET(SRCS
gui/setup_video.h
gui/shop.cpp
gui/shop.h
+ gui/shoplistbox.cpp
+ gui/shoplistbox.h
gui/skill.cpp
gui/skill.h
gui/slider.cpp
diff --git a/src/gui/trade.cpp b/src/gui/trade.cpp
index 5352b23d..c1d86d70 100644
--- a/src/gui/trade.cpp
+++ b/src/gui/trade.cpp
@@ -52,7 +52,7 @@ TradeWindow::TradeWindow(Network *network):
mPartnerInventory(new Inventory())
{
setWindowName("Trade");
- setDefaultSize(115, 197, 322, 150);
+ setDefaultSize(115, 197, 332, 209);
mAddButton = new Button("Add", "add", this);
mOkButton = new Button("Ok", "ok", this);
@@ -99,33 +99,33 @@ TradeWindow::TradeWindow(Network *network):
add(mMoneyField);
add(mMoneyLabel);
- mMoneyField->setPosition(8 + 60, getHeight() - 20);
+ gcn::Rectangle area = getChildrenArea();
+ int width = area.width;
+ int height = area.height;
+
+ mMoneyField->setPosition(8 + 60, height - 20);
mMoneyField->setWidth(50);
- mMoneyLabel->setPosition(8 + 60 + 50 + 6, getHeight() - 20);
- mMoneyLabel2->setPosition(8, getHeight() - 20);
+ mMoneyLabel->setPosition(8 + 60 + 50 + 6, height - 20);
+ mMoneyLabel2->setPosition(8, height - 20);
- mCancelButton->setPosition(getWidth() - 54, getHeight() - 49);
- mTradeButton->setPosition(mCancelButton->getX() - 41
- , getHeight() - 49);
- mOkButton->setPosition(mTradeButton->getX() - 24,
- getHeight() - 49);
- mAddButton->setPosition(mOkButton->getX() - 31,
- getHeight() - 49);
+ mCancelButton->setPosition(width - 54, height - 49);
+ mTradeButton->setPosition(mCancelButton->getX() - 41, height - 49);
+ mOkButton->setPosition(mTradeButton->getX() - 24, height - 49);
+ mAddButton->setPosition(mOkButton->getX() - 31, height - 49);
- mMyItemContainer->setSize(getWidth() - 24 - 12 - 1,
- (INVENTORY_SIZE * 24) / (getWidth() / 24) - 1);
- mMyScroll->setSize(getWidth() - 16, (getHeight() - 76) / 2);
+ mMyItemContainer->setSize(width - 24 - 12 - 1,
+ (INVENTORY_SIZE * 24) / (width / 24) - 1);
+ mMyScroll->setSize(width - 16, (height - 76) / 2);
- mPartnerItemContainer->setSize(getWidth() - 24 - 12 - 1,
- (INVENTORY_SIZE * 24) / (getWidth() / 24) - 1);
- mPartnerScroll->setSize(getWidth() - 16, (getHeight() - 76) / 2);
+ mPartnerItemContainer->setSize(width - 24 - 12 - 1,
+ (INVENTORY_SIZE * 24) / (width / 24) - 1);
+ mPartnerScroll->setSize(width - 16, (height - 76) / 2);
mItemNameLabel->setPosition(8,
mPartnerScroll->getY() + mPartnerScroll->getHeight() + 4);
mItemDescriptionLabel->setPosition(8,
mItemNameLabel->getY() + mItemNameLabel->getHeight() + 4);
-
}
TradeWindow::~TradeWindow()