diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-02-24 14:01:32 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-02-24 21:18:57 +0300 |
commit | 0a8b5d325f2d2c326b6da27399711b198417a499 (patch) | |
tree | 9e89aa7610f3f74ef9df53f6afce6655fc95ab07 /src/gui/windows | |
parent | 779b65f15d3350b2d95a095e24a90526c64dcecb (diff) | |
download | manaplus-0a8b5d325f2d2c326b6da27399711b198417a499.tar.gz manaplus-0a8b5d325f2d2c326b6da27399711b198417a499.tar.bz2 manaplus-0a8b5d325f2d2c326b6da27399711b198417a499.tar.xz manaplus-0a8b5d325f2d2c326b6da27399711b198417a499.zip |
Rename Rectangle into Rect.
Rename ClipRectangle into ClipRect.
Diffstat (limited to 'src/gui/windows')
-rw-r--r-- | src/gui/windows/charcreatedialog.cpp | 6 | ||||
-rw-r--r-- | src/gui/windows/chatwindow.cpp | 2 | ||||
-rw-r--r-- | src/gui/windows/debugwindow.cpp | 10 | ||||
-rw-r--r-- | src/gui/windows/debugwindow.h | 2 | ||||
-rw-r--r-- | src/gui/windows/equipmentwindow.cpp | 12 | ||||
-rw-r--r-- | src/gui/windows/inventorywindow.cpp | 2 | ||||
-rw-r--r-- | src/gui/windows/minimap.cpp | 14 | ||||
-rw-r--r-- | src/gui/windows/ministatuswindow.cpp | 8 | ||||
-rw-r--r-- | src/gui/windows/ministatuswindow.h | 2 | ||||
-rw-r--r-- | src/gui/windows/npcpostdialog.cpp | 2 | ||||
-rw-r--r-- | src/gui/windows/outfitwindow.cpp | 6 | ||||
-rw-r--r-- | src/gui/windows/selldialog.cpp | 2 | ||||
-rw-r--r-- | src/gui/windows/serverdialog.cpp | 2 | ||||
-rw-r--r-- | src/gui/windows/setupwindow.cpp | 6 | ||||
-rw-r--r-- | src/gui/windows/skilldialog.cpp | 2 | ||||
-rw-r--r-- | src/gui/windows/whoisonline.cpp | 6 |
16 files changed, 42 insertions, 42 deletions
diff --git a/src/gui/windows/charcreatedialog.cpp b/src/gui/windows/charcreatedialog.cpp index 1ddaaa7b2..4f98cb931 100644 --- a/src/gui/windows/charcreatedialog.cpp +++ b/src/gui/windows/charcreatedialog.cpp @@ -208,13 +208,13 @@ CharCreateDialog::CharCreateDialog(CharSelectDialog *const parent, const int h = 350; setContentSize(w, h); - mPlayerBox->setDimension(Rectangle(360, 0, 110, 90)); + mPlayerBox->setDimension(Rect(360, 0, 110, 90)); mActionButton->setPosition(385, 100); mRotateButton->setPosition(415, 100); mNameLabel->setPosition(5, 2); mNameField->setDimension( - Rectangle(60, 2, 300, mNameField->getHeight())); + Rect(60, 2, 300, mNameField->getHeight())); const int leftX = 120; const int rightX = 300; @@ -530,7 +530,7 @@ void CharCreateDialog::setAttributes(const StringVect &labels, add(mAttributeLabel[i]); mAttributeSlider[i] = new Slider(this, min, max); - mAttributeSlider[i]->setDimension(Rectangle(140, y + i * 24, + mAttributeSlider[i]->setDimension(Rect(140, y + i * 24, 150, 12)); mAttributeSlider[i]->setActionEventId("statslider"); mAttributeSlider[i]->addActionListener(this); diff --git a/src/gui/windows/chatwindow.cpp b/src/gui/windows/chatwindow.cpp index 3c0e09ad5..d769c4397 100644 --- a/src/gui/windows/chatwindow.cpp +++ b/src/gui/windows/chatwindow.cpp @@ -327,7 +327,7 @@ void ChatWindow::updateTabsMargin() void ChatWindow::adjustTabSize() { - const Rectangle area = getChildrenArea(); + const Rect area = getChildrenArea(); const int aw = area.width; const int ah = area.height; diff --git a/src/gui/windows/debugwindow.cpp b/src/gui/windows/debugwindow.cpp index 2a227c4e2..50dc5dbe5 100644 --- a/src/gui/windows/debugwindow.cpp +++ b/src/gui/windows/debugwindow.cpp @@ -75,7 +75,7 @@ DebugWindow::DebugWindow() : // TRANSLATORS: debug window tab mTabs->addTab(std::string(_("Net")), mNetWidget); - mTabs->setDimension(Rectangle(0, 0, 600, 300)); + mTabs->setDimension(Rect(0, 0, 600, 300)); const int w = mDimension.width; const int h = mDimension.height; @@ -151,7 +151,7 @@ void DebugWindow::widgetResized(const Event &event) { Window::widgetResized(event); - mTabs->setDimension(Rectangle(0, 0, + mTabs->setDimension(Rect(0, 0, mDimension.width, mDimension.height)); } @@ -267,7 +267,7 @@ MapDebugTab::MapDebugTab(const Widget2 *const widget) : #endif place.getCell().matchColWidth(0, 0); place = h.getPlacer(0, 1); - setDimension(Rectangle(0, 0, 600, 300)); + setDimension(Rect(0, 0, 600, 300)); } void MapDebugTab::logic() @@ -412,7 +412,7 @@ TargetDebugTab::TargetDebugTab(const Widget2 *const widget) : place.getCell().matchColWidth(0, 0); place = h.getPlacer(0, 1); - setDimension(Rectangle(0, 0, 600, 300)); + setDimension(Rect(0, 0, 600, 300)); } void TargetDebugTab::logic() @@ -531,7 +531,7 @@ NetDebugTab::NetDebugTab(const Widget2 *const widget) : place.getCell().matchColWidth(0, 0); place = h.getPlacer(0, 1); - setDimension(Rectangle(0, 0, 600, 300)); + setDimension(Rect(0, 0, 600, 300)); } void NetDebugTab::logic() diff --git a/src/gui/windows/debugwindow.h b/src/gui/windows/debugwindow.h index 194385b06..1a56f3164 100644 --- a/src/gui/windows/debugwindow.h +++ b/src/gui/windows/debugwindow.h @@ -41,7 +41,7 @@ class DebugTab : public Container } void resize(const int x, const int y) - { setDimension(Rectangle(0, 0, x, y)); } + { setDimension(Rect(0, 0, x, y)); } protected: explicit DebugTab(const Widget2 *const widget) : diff --git a/src/gui/windows/equipmentwindow.cpp b/src/gui/windows/equipmentwindow.cpp index ea7944f94..c793ba6ce 100644 --- a/src/gui/windows/equipmentwindow.cpp +++ b/src/gui/windows/equipmentwindow.cpp @@ -92,7 +92,7 @@ EquipmentWindow::EquipmentWindow(Equipment *const equipment, mBoxSize = 36; // Control that shows the Player - mPlayerBox->setDimension(Rectangle(50, 80, 74, 168)); + mPlayerBox->setDimension(Rect(50, 80, 74, 168)); mPlayerBox->setPlayer(being); if (foring) @@ -116,7 +116,7 @@ EquipmentWindow::EquipmentWindow(Equipment *const equipment, void EquipmentWindow::postInit() { - const Rectangle &area = getChildrenArea(); + const Rect &area = getChildrenArea(); mUnequip->setPosition(area.width - mUnequip->getWidth() - mButtonPadding, area.height - mUnequip->getHeight() - mButtonPadding); mUnequip->setEnabled(false); @@ -283,7 +283,7 @@ Item *EquipmentWindow::getItem(const int x, const int y) const const EquipmentBox *const box = *it; if (!box) continue; - const Rectangle tRect(box->x, box->y, mBoxSize, mBoxSize); + const Rect tRect(box->x, box->y, mBoxSize, mBoxSize); if (tRect.isPointInRect(x, y)) return mEquipment->getEquipment(i); @@ -321,7 +321,7 @@ void EquipmentWindow::mousePressed(MouseEvent& mouseEvent) if (!box) continue; const Item *const item = mEquipment->getEquipment(i); - const Rectangle tRect(box->x, box->y, mBoxSize, mBoxSize); + const Rect tRect(box->x, box->y, mBoxSize, mBoxSize); if (tRect.isPointInRect(x, y)) { @@ -402,7 +402,7 @@ void EquipmentWindow::mouseReleased(MouseEvent &mouseEvent) const EquipmentBox *const box = *it; if (!box) continue; - const Rectangle tRect(box->x, box->y, mBoxSize, mBoxSize); + const Rect tRect(box->x, box->y, mBoxSize, mBoxSize); if (tRect.isPointInRect(x, y)) return; @@ -514,7 +514,7 @@ void EquipmentWindow::fillBoxes() void EquipmentWindow::loadPlayerBox(const XmlNodePtr playerBoxNode) { - mPlayerBox->setDimension(Rectangle( + mPlayerBox->setDimension(Rect( XML::getProperty(playerBoxNode, "x", 50), XML::getProperty(playerBoxNode, "y", 80), XML::getProperty(playerBoxNode, "width", 74), diff --git a/src/gui/windows/inventorywindow.cpp b/src/gui/windows/inventorywindow.cpp index af6a9a2c4..5323854fb 100644 --- a/src/gui/windows/inventorywindow.cpp +++ b/src/gui/windows/inventorywindow.cpp @@ -565,7 +565,7 @@ void InventoryWindow::mouseMoved(MouseEvent &event) { const int x = event.getX(); const int y = event.getY(); - const Rectangle &rect = mDimension; + const Rect &rect = mDimension; mTextPopup->show(rect.x + x, rect.y + y, strprintf(_("Money: %s"), Units::formatCurrency(PlayerInfo::getAttribute( PlayerInfo::MONEY)).c_str())); diff --git a/src/gui/windows/minimap.cpp b/src/gui/windows/minimap.cpp index 4c246aed4..ef1830763 100644 --- a/src/gui/windows/minimap.cpp +++ b/src/gui/windows/minimap.cpp @@ -213,7 +213,7 @@ void Minimap::setMap(const Map *const map) setHeight(height); } - const Rectangle &rect = mDimension; + const Rect &rect = mDimension; setDefaultSize(rect.x, rect.y, rect.width, rect.height); resetToDefaultSize(); @@ -244,7 +244,7 @@ void Minimap::draw(Graphics *graphics) return; } - const Rectangle a = getChildrenArea(); + const Rect a = getChildrenArea(); graphics->pushClipArea(a); @@ -346,7 +346,7 @@ void Minimap::draw(Graphics *graphics) dotSize - 1) * mWidthProportion); const Vector &pos = being->getPosition(); - graphics->fillRectangle(Rectangle( + graphics->fillRectangle(Rect( static_cast<float>(pos.x * mWidthProportion) / 32 + mMapOriginX - offsetWidth, static_cast<float>(pos.y * mHeightProportion) / 32 @@ -384,7 +384,7 @@ void Minimap::draw(Graphics *graphics) const int offsetWidth = static_cast<int>( mWidthProportion); - graphics->fillRectangle(Rectangle( + graphics->fillRectangle(Rect( static_cast<int>(member->getX() * mWidthProportion) + mMapOriginX - offsetWidth, static_cast<int>(member->getY() @@ -429,7 +429,7 @@ void Minimap::draw(Graphics *graphics) } graphics->setColor(userPalette->getColor(UserPalette::PC)); - graphics->drawRectangle(Rectangle(x, y, w, h)); + graphics->drawRectangle(Rect(x, y, w, h)); graphics->popClipArea(); BLOCK_END("Minimap::draw") } @@ -463,7 +463,7 @@ void Minimap::mouseMoved(MouseEvent &event) Window::mouseMoved(event); const int x = event.getX(); const int y = event.getY(); - const Rectangle &rect = mDimension; + const Rect &rect = mDimension; mTextPopup->show(x + rect.x, y + rect.y, mCaption); } @@ -475,7 +475,7 @@ void Minimap::mouseExited(MouseEvent &event) void Minimap::screenToMap(int &x, int &y) { - const Rectangle a = getChildrenArea(); + const Rect a = getChildrenArea(); x = (x - a.x - mMapOriginX + mWidthProportion) / mWidthProportion; y = (y - a.y - mMapOriginY + mHeightProportion) / mHeightProportion; } diff --git a/src/gui/windows/ministatuswindow.cpp b/src/gui/windows/ministatuswindow.cpp index 655ccb277..db4555b26 100644 --- a/src/gui/windows/ministatuswindow.cpp +++ b/src/gui/windows/ministatuswindow.cpp @@ -322,7 +322,7 @@ void MiniStatusWindow::mouseMoved(MouseEvent &event) const int x = event.getX(); const int y = event.getY(); - const Rectangle &rect = mDimension; + const Rect &rect = mDimension; if (event.getSource() == mStatusBar) { mStatusPopup->view(x + rect.x, y + rect.y); @@ -535,12 +535,12 @@ void MiniStatusWindow::updateArrows() StatusWindow::updateArrowsBar(mArrowsBar); } -Rectangle MiniStatusWindow::getChildrenArea() +Rect MiniStatusWindow::getChildrenArea() { const int padding = mPadding; const int padding2 = padding * 2; - const Rectangle &rect = mDimension; - return Rectangle(padding, padding, + const Rect &rect = mDimension; + return Rect(padding, padding, rect.width - padding2, rect.height - padding2); } diff --git a/src/gui/windows/ministatuswindow.h b/src/gui/windows/ministatuswindow.h index e061cbfae..0344d6c3a 100644 --- a/src/gui/windows/ministatuswindow.h +++ b/src/gui/windows/ministatuswindow.h @@ -88,7 +88,7 @@ class MiniStatusWindow final : public Popup, std::vector <ProgressBar*> &getBars() A_WARN_UNUSED { return mBars; } - Rectangle getChildrenArea() override final A_WARN_UNUSED; + Rect getChildrenArea() override final A_WARN_UNUSED; #ifdef USE_PROFILER void logicChildren(); diff --git a/src/gui/windows/npcpostdialog.cpp b/src/gui/windows/npcpostdialog.cpp index aa510b88e..3c63775fe 100644 --- a/src/gui/windows/npcpostdialog.cpp +++ b/src/gui/windows/npcpostdialog.cpp @@ -76,7 +76,7 @@ void NpcPostDialog::postInit() // create scroll box for letter text ScrollArea *const scrollArea = new ScrollArea(this, mText); scrollArea->setHorizontalScrollPolicy(gcn::ScrollArea::SHOW_NEVER); - scrollArea->setDimension(Rectangle( + scrollArea->setDimension(Rect( 5, mSender->getHeight() + 5, 380, 140 - (mSender->getHeight() + sendButton->getHeight()))); diff --git a/src/gui/windows/outfitwindow.cpp b/src/gui/windows/outfitwindow.cpp index 0f25b84a6..be0c840f6 100644 --- a/src/gui/windows/outfitwindow.cpp +++ b/src/gui/windows/outfitwindow.cpp @@ -328,9 +328,9 @@ void OutfitWindow::draw(Graphics *graphics) + ((i / mGridWidth) * mBoxHeight); graphics->setColor(mBorderColor); - graphics->drawRectangle(Rectangle(itemX, itemY, 32, 32)); + graphics->drawRectangle(Rect(itemX, itemY, 32, 32)); graphics->setColor(mBackgroundColor); - graphics->fillRectangle(Rectangle(itemX, itemY, 32, 32)); + graphics->fillRectangle(Rect(itemX, itemY, 32, 32)); if (mItems[mCurrentOutfit][i] < 0) continue; @@ -483,7 +483,7 @@ void OutfitWindow::mouseReleased(MouseEvent &event) int OutfitWindow::getIndexFromGrid(const int pointX, const int pointY) const { - const Rectangle tRect = Rectangle(mPadding, mTitleBarHeight, + const Rect tRect = Rect(mPadding, mTitleBarHeight, mGridWidth * mBoxWidth, mGridHeight * mBoxHeight); if (!tRect.isPointInRect(pointX, pointY)) return -1; diff --git a/src/gui/windows/selldialog.cpp b/src/gui/windows/selldialog.cpp index 525e3f133..524c77366 100644 --- a/src/gui/windows/selldialog.cpp +++ b/src/gui/windows/selldialog.cpp @@ -292,7 +292,7 @@ void SellDialog::action(const ActionEvent &event) delete mShopItems->at(selectedItem); mShopItems->erase(selectedItem); - Rectangle scroll; + Rect scroll; scroll.y = mShopItemList->getRowHeight() * (selectedItem + 1); scroll.height = mShopItemList->getRowHeight(); mShopItemList->showPart(scroll); diff --git a/src/gui/windows/serverdialog.cpp b/src/gui/windows/serverdialog.cpp index 18da8682e..579e9ad18 100644 --- a/src/gui/windows/serverdialog.cpp +++ b/src/gui/windows/serverdialog.cpp @@ -139,7 +139,7 @@ public: // Draw filled rectangle around the selected list element if (mSelected >= 0) { - graphics->fillRectangle(Rectangle(mPadding, + graphics->fillRectangle(Rect(mPadding, height * mSelected + mPadding, getWidth() - 2 * mPadding, height)); } diff --git a/src/gui/windows/setupwindow.cpp b/src/gui/windows/setupwindow.cpp index 0f4468882..2bcac85a5 100644 --- a/src/gui/windows/setupwindow.cpp +++ b/src/gui/windows/setupwindow.cpp @@ -113,7 +113,7 @@ void SetupWindow::postInit() mResetWindows = btn; } - mPanel->setDimension(Rectangle(5, 5, width - 10, height - 40)); + mPanel->setDimension(Rect(5, 5, width - 10, height - 40)); mPanel->enableScrollButtons(true); mTabs.push_back(new Setup_Video(this)); @@ -265,12 +265,12 @@ void SetupWindow::widgetResized(const Event &event) { Window::widgetResized(event); - const Rectangle area = getChildrenArea(); + const Rect area = getChildrenArea(); int x = area.width; const int height = area.height; const int width = area.width; const int buttonPadding = getOption("buttonPadding", 5); - mPanel->setDimension(Rectangle(5, 5, width - 10, height - 40)); + mPanel->setDimension(Rect(5, 5, width - 10, height - 40)); FOR_EACH (std::vector<Button*>::iterator, it, mButtons) { Button *const btn = *it; diff --git a/src/gui/windows/skilldialog.cpp b/src/gui/windows/skilldialog.cpp index 1346c8e95..21cc009bc 100644 --- a/src/gui/windows/skilldialog.cpp +++ b/src/gui/windows/skilldialog.cpp @@ -115,7 +115,7 @@ class SkillListBox final : public ListBox // Draw filled rectangle around the selected list element if (mSelected >= 0) { - graphics->fillRectangle(Rectangle(mPadding, getRowHeight() + graphics->fillRectangle(Rect(mPadding, getRowHeight() * mSelected + mPadding, getWidth() - 2 * mPadding, getRowHeight())); } diff --git a/src/gui/windows/whoisonline.cpp b/src/gui/windows/whoisonline.cpp index 70edccad1..dabc8c7c1 100644 --- a/src/gui/windows/whoisonline.cpp +++ b/src/gui/windows/whoisonline.cpp @@ -116,10 +116,10 @@ void WhoIsOnline::postInit() setSaveVisible(true); mUpdateButton->setEnabled(false); - mUpdateButton->setDimension(Rectangle(5, 5, w - 10, 20 + 5)); + mUpdateButton->setDimension(Rect(5, 5, w - 10, 20 + 5)); mBrowserBox->setOpaque(false); - mScrollArea->setDimension(Rectangle(5, 20 + 10, w - 10, h - 10 - 30)); + mScrollArea->setDimension(Rect(5, 20 + 10, w - 10, h - 10 - 30)); mScrollArea->setSize(w - 10, h - 10 - 30); mBrowserBox->setLinkHandler(this); @@ -723,7 +723,7 @@ void WhoIsOnline::widgetResized(const Event &event) void WhoIsOnline::updateSize() { - const Rectangle area = getChildrenArea(); + const Rect area = getChildrenArea(); if (mUpdateButton) mUpdateButton->setWidth(area.width - 10); |