diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-05-28 00:55:13 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-05-28 00:55:13 +0300 |
commit | 01a0e4b658241cc3dbd8a5d11d34a6de48dab159 (patch) | |
tree | 37294c079b9a05768b7380f7595784eb73485769 /src/gui/windows/inventorywindow.cpp | |
parent | 072b727ae4d072d6c84f3331d78ca5a2ac76d271 (diff) | |
download | manaverse-01a0e4b658241cc3dbd8a5d11d34a6de48dab159.tar.gz manaverse-01a0e4b658241cc3dbd8a5d11d34a6de48dab159.tar.bz2 manaverse-01a0e4b658241cc3dbd8a5d11d34a6de48dab159.tar.xz manaverse-01a0e4b658241cc3dbd8a5d11d34a6de48dab159.zip |
Add strong typed bool type Visible.
Diffstat (limited to 'src/gui/windows/inventorywindow.cpp')
-rw-r--r-- | src/gui/windows/inventorywindow.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/gui/windows/inventorywindow.cpp b/src/gui/windows/inventorywindow.cpp index 11ca2e359..6094ffc91 100644 --- a/src/gui/windows/inventorywindow.cpp +++ b/src/gui/windows/inventorywindow.cpp @@ -348,7 +348,7 @@ void InventoryWindow::postInit() mItems->setSortType(mSortDropDown->getSelected()); widgetResized(Event(nullptr)); if (mInventory && mInventory->getType() == InventoryType::STORAGE) - setVisible(true); + setVisible(Visible_true); } InventoryWindow::~InventoryWindow() @@ -541,7 +541,7 @@ void InventoryWindow::widgetHidden(const Event &event) { Window::widgetHidden(event); if (itemPopup) - itemPopup->setVisible(false); + itemPopup->setVisible(Visible_false); } void InventoryWindow::mouseClicked(MouseEvent &event) @@ -788,7 +788,7 @@ void InventoryWindow::updateButtons(const Item *item) } } -void InventoryWindow::setSplitAllowed(const bool allowed) +void InventoryWindow::setSplitAllowed(const Visible allowed) { if (mSplitButton) mSplitButton->setVisible(allowed); @@ -808,7 +808,7 @@ void InventoryWindow::close() #ifdef EATHENA_SUPPORT case InventoryType::CART: #endif - setVisible(false); + setVisible(Visible_false); break; case InventoryType::STORAGE: @@ -973,7 +973,7 @@ void InventoryWindow::widgetResized(const Event &event) { if (!mCompactMode) { - mNameFilter->setVisible(false); + mNameFilter->setVisible(Visible_false); mNameFilterCell->setType(LayoutCell::NONE); mFilterCell->setWidth(mFilterCell->getWidth() + 3); mCompactMode = true; @@ -981,16 +981,16 @@ void InventoryWindow::widgetResized(const Event &event) } else if (mCompactMode) { - mNameFilter->setVisible(true); + mNameFilter->setVisible(Visible_true); mNameFilterCell->setType(LayoutCell::WIDGET); mFilterCell->setWidth(mFilterCell->getWidth() - 3); mCompactMode = false; } } -void InventoryWindow::setVisible(bool visible) +void InventoryWindow::setVisible(Visible visible) { - if (!visible) + if (visible == Visible_false) mSortDropDown->hideDrop(); Window::setVisible(visible); } |