diff options
author | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2006-10-01 14:47:42 +0000 |
---|---|---|
committer | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2006-10-01 14:47:42 +0000 |
commit | 935ff1e5cdd0bc44d5de947cb06ee30871b870eb (patch) | |
tree | 986a94e587b724c93b4a051de1676324fc10b42a | |
parent | fc0b308983f9421861e508381f73a0605eeed5b7 (diff) | |
download | mana-935ff1e5cdd0bc44d5de947cb06ee30871b870eb.tar.gz mana-935ff1e5cdd0bc44d5de947cb06ee30871b870eb.tar.bz2 mana-935ff1e5cdd0bc44d5de947cb06ee30871b870eb.tar.xz mana-935ff1e5cdd0bc44d5de947cb06ee30871b870eb.zip |
Accepted patches by GDO and VictorSan that fix problems with hiding windows
using h and problems with trade window positioning.
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | NEWS | 5 | ||||
-rw-r--r-- | src/game.cpp | 29 | ||||
-rw-r--r-- | src/gui/inventorywindow.cpp | 1 | ||||
-rw-r--r-- | src/gui/trade.cpp | 10 |
5 files changed, 29 insertions, 22 deletions
@@ -1,3 +1,9 @@ +2006-10-01 Bjørn Lindeijer <bjorn@lindeijer.nl> + + * src/game.cpp, src/gui/trade.cpp, src/gui/inventorywindow.cpp: + Accepted patches by GDO and VictorSan that fix problems with hiding + windows using h and problems with trade window positioning. + 2006-09-38 Björn Steinbrink <B.Steinbrink@gmx.de> * src/map.cpp: Fix random crashes when map tiles are missing. @@ -1,3 +1,8 @@ +0.0.22 (...) +- Fixed problem with OpenGL related redefinition +- Fixed problems with hiding windows using h +- Fixed trade window positioning + 0.0.21 (17 September 2006) - Added item pickup messages to the chat dialog - Added XP bar to ministatus in the top left diff --git a/src/game.cpp b/src/game.cpp index bc6b0622..b07c5c9a 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -195,9 +195,7 @@ void createGuiWindows(Network *network) chargeDialog->setPosition( screenW - 5 - chargeDialog->getWidth(), screenH - chargeDialog->getHeight() - 15); - tradeWindow->setPosition(screenW - statusWindow->getWidth() - - tradeWindow->getWidth() - 10, - inventoryWindow->getY() + inventoryWindow->getHeight()); + /*buddyWindow->setPosition(10, minimap->getHeight() + 30);*/ @@ -492,21 +490,18 @@ void Game::handleInput() } break; - // Attempt to hide all windows + // Hide certain windows case SDLK_h: - statusWindow->setVisible(false); - buyDialog->setVisible(false); - sellDialog->setVisible(false); - buySellDialog->setVisible(false); - inventoryWindow->setVisible(false); - npcTextDialog->setVisible(false); - npcListDialog->setVisible(false); - skillDialog->setVisible(false); - setupWindow->setVisible(false); - equipmentWindow->setVisible(false); - chargeDialog->setVisible(false); - helpWindow->setVisible(false); - debugWindow->setVisible(false); + if (!chatWindow->isFocused()) + { + statusWindow->setVisible(false); + inventoryWindow->setVisible(false); + skillDialog->setVisible(false); + setupWindow->setVisible(false); + equipmentWindow->setVisible(false); + helpWindow->setVisible(false); + debugWindow->setVisible(false); + } break; // Picking up items on the floor diff --git a/src/gui/inventorywindow.cpp b/src/gui/inventorywindow.cpp index 5812a71a..eb85220b 100644 --- a/src/gui/inventorywindow.cpp +++ b/src/gui/inventorywindow.cpp @@ -49,6 +49,7 @@ InventoryWindow::InventoryWindow(): setResizable(true); setMinWidth(240); setMinHeight(172); + // If you adjust these defaults, don't forget to adjust the trade window's. setDefaultSize(115, 25, 322, 172); mUseButton = new Button("Use", "use", this); diff --git a/src/gui/trade.cpp b/src/gui/trade.cpp index cb839157..b83c6ee6 100644 --- a/src/gui/trade.cpp +++ b/src/gui/trade.cpp @@ -51,7 +51,8 @@ TradeWindow::TradeWindow(Network *network): mMyInventory(new Inventory()), mPartnerInventory(new Inventory()) { - setContentSize(322, 150); + setWindowName("Trade"); + setDefaultSize(115,197,322,150); mAddButton = new Button("Add", "add", this); mOkButton = new Button("Ok", "ok", this); @@ -104,12 +105,12 @@ TradeWindow::TradeWindow(Network *network): mMoneyLabel->setPosition(8 + 60 + 50 + 6, getHeight() - 20); mMoneyLabel2->setPosition(8, getHeight() - 20); - mCancelButton->setPosition(getWidth() - 48, getHeight() - 49); - mTradeButton->setPosition(mCancelButton->getX() - 40 + mCancelButton->setPosition(getWidth() - 54, getHeight() - 49); + mTradeButton->setPosition(mCancelButton->getX() - 41 , getHeight() - 49); mOkButton->setPosition(mTradeButton->getX() - 24, getHeight() - 49); - mAddButton->setPosition(mOkButton->getX() - 32, + mAddButton->setPosition(mOkButton->getX() - 31, getHeight() - 49); mMyItemContainer->setSize(getWidth() - 24 - 12 - 1, @@ -125,7 +126,6 @@ TradeWindow::TradeWindow(Network *network): mItemDescriptionLabel->setPosition(8, mItemNameLabel->getY() + mItemNameLabel->getHeight() + 4); - setContentSize(getWidth(), getHeight()); } TradeWindow::~TradeWindow() |