diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/game.cpp | 29 | ||||
-rw-r--r-- | src/gui/inventorywindow.cpp | 1 | ||||
-rw-r--r-- | src/gui/trade.cpp | 10 |
3 files changed, 18 insertions, 22 deletions
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() |