diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-03-21 19:45:48 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-03-21 19:45:48 +0300 |
commit | 60b40c0c68e9cffbc5f48d4f672d99009488f8b1 (patch) | |
tree | 7d2efefb965c0ae928eb80313f2f37fa34cf42b4 /src/gui/windows | |
parent | 3ed0b5f6edce152fa2eca9c84d64cbeec8ac0173 (diff) | |
download | manaplus-60b40c0c68e9cffbc5f48d4f672d99009488f8b1.tar.gz manaplus-60b40c0c68e9cffbc5f48d4f672d99009488f8b1.tar.bz2 manaplus-60b40c0c68e9cffbc5f48d4f672d99009488f8b1.tar.xz manaplus-60b40c0c68e9cffbc5f48d4f672d99009488f8b1.zip |
Rename mouseEvent variables into event.
Diffstat (limited to 'src/gui/windows')
-rw-r--r-- | src/gui/windows/chatwindow.cpp | 8 | ||||
-rw-r--r-- | src/gui/windows/chatwindow.h | 4 | ||||
-rw-r--r-- | src/gui/windows/equipmentwindow.cpp | 28 | ||||
-rw-r--r-- | src/gui/windows/equipmentwindow.h | 2 | ||||
-rw-r--r-- | src/gui/windows/ministatuswindow.h | 2 | ||||
-rw-r--r-- | src/gui/windows/serverdialog.cpp | 10 | ||||
-rw-r--r-- | src/gui/windows/serverdialog.h | 2 |
7 files changed, 28 insertions, 28 deletions
diff --git a/src/gui/windows/chatwindow.cpp b/src/gui/windows/chatwindow.cpp index c6e4182d8..0a5480520 100644 --- a/src/gui/windows/chatwindow.cpp +++ b/src/gui/windows/chatwindow.cpp @@ -1858,16 +1858,16 @@ void ChatWindow::mouseMoved(MouseEvent &event) Window::mouseMoved(event); } -void ChatWindow::mouseEntered(MouseEvent& mouseEvent) +void ChatWindow::mouseEntered(MouseEvent& event) { mHaveMouse = true; - Window::mouseEntered(mouseEvent); + Window::mouseEntered(event); } -void ChatWindow::mouseExited(MouseEvent& mouseEvent) +void ChatWindow::mouseExited(MouseEvent& event) { updateVisibility(); - Window::mouseExited(mouseEvent); + Window::mouseExited(event); } void ChatWindow::draw(Graphics* graphics) diff --git a/src/gui/windows/chatwindow.h b/src/gui/windows/chatwindow.h index bd5374c56..e755e43f2 100644 --- a/src/gui/windows/chatwindow.h +++ b/src/gui/windows/chatwindow.h @@ -274,11 +274,11 @@ class ChatWindow final : public Window, void optionChanged(const std::string &name) override final; - void mouseEntered(MouseEvent& mouseEvent) override final; + void mouseEntered(MouseEvent& event) override final; void mouseMoved(MouseEvent &event) override final; - void mouseExited(MouseEvent& mouseEvent A_UNUSED) override final; + void mouseExited(MouseEvent& event A_UNUSED) override final; void draw(Graphics* graphics) override final; diff --git a/src/gui/windows/equipmentwindow.cpp b/src/gui/windows/equipmentwindow.cpp index b8b693fc1..47e7e8b7d 100644 --- a/src/gui/windows/equipmentwindow.cpp +++ b/src/gui/windows/equipmentwindow.cpp @@ -295,22 +295,22 @@ Item *EquipmentWindow::getItem(const int x, const int y) const return nullptr; } -void EquipmentWindow::mousePressed(MouseEvent& mouseEvent) +void EquipmentWindow::mousePressed(MouseEvent& event) { if (!mEquipment) { - Window::mousePressed(mouseEvent); + Window::mousePressed(event); return; } - const int x = mouseEvent.getX(); - const int y = mouseEvent.getY(); + const int x = event.getX(); + const int y = event.getY(); - if (mouseEvent.getButton() == MouseEvent::LEFT) + if (event.getButton() == MouseEvent::LEFT) { if (mForing) { - Window::mousePressed(mouseEvent); + Window::mousePressed(event); return; } // Checks if any of the presses were in the equip boxes. @@ -332,7 +332,7 @@ void EquipmentWindow::mousePressed(MouseEvent& mouseEvent) inBox = true; if (item) { - mouseEvent.consume(); + event.consume(); setSelected(i); dragDrop.dragItem(item, DRAGDROP_SOURCE_EQUIPMENT); return; @@ -342,7 +342,7 @@ void EquipmentWindow::mousePressed(MouseEvent& mouseEvent) return; } } - else if (mouseEvent.getButton() == MouseEvent::RIGHT) + else if (event.getButton() == MouseEvent::RIGHT) { if (Item *const item = getItem(x, y)) { @@ -356,7 +356,7 @@ void EquipmentWindow::mousePressed(MouseEvent& mouseEvent) const int my = y + getY(); if (viewport) { - mouseEvent.consume(); + event.consume(); if (mForing) viewport->showUndressPopup(mx, my, mBeing, item); else @@ -365,12 +365,12 @@ void EquipmentWindow::mousePressed(MouseEvent& mouseEvent) } } } - Window::mousePressed(mouseEvent); + Window::mousePressed(event); } -void EquipmentWindow::mouseReleased(MouseEvent &mouseEvent) +void EquipmentWindow::mouseReleased(MouseEvent &event) { - Window::mouseReleased(mouseEvent); + Window::mouseReleased(event); const DragDropSource src = dragDrop.getSource(); if (dragDrop.isEmpty() || (src != DRAGDROP_SOURCE_INVENTORY && src != DRAGDROP_SOURCE_EQUIPMENT)) @@ -399,8 +399,8 @@ void EquipmentWindow::mouseReleased(MouseEvent &mouseEvent) { if (item->isEquipment()) { - const int x = mouseEvent.getX(); - const int y = mouseEvent.getY(); + const int x = event.getX(); + const int y = event.getY(); for (std::vector<EquipmentBox*>::const_iterator it = mBoxes.begin(), it_end = mBoxes.end(); it != it_end; ++ it) diff --git a/src/gui/windows/equipmentwindow.h b/src/gui/windows/equipmentwindow.h index 245328b8e..45d4246e3 100644 --- a/src/gui/windows/equipmentwindow.h +++ b/src/gui/windows/equipmentwindow.h @@ -86,7 +86,7 @@ class EquipmentWindow final : public Window, void action(const ActionEvent &event) override final; - void mousePressed(MouseEvent& mouseEvent) override final; + void mousePressed(MouseEvent& event) override final; const Item* getEquipment(const int i) const A_WARN_UNUSED { return mEquipment ? mEquipment->getEquipment(i) : nullptr; } diff --git a/src/gui/windows/ministatuswindow.h b/src/gui/windows/ministatuswindow.h index ee20ef69b..feabb82d0 100644 --- a/src/gui/windows/ministatuswindow.h +++ b/src/gui/windows/ministatuswindow.h @@ -71,7 +71,7 @@ class MiniStatusWindow final : public Popup, void draw(Graphics *graphics) override final; - void mouseMoved(MouseEvent &mouseEvent) override final; + void mouseMoved(MouseEvent &event) override final; void mousePressed(MouseEvent &event) override final; diff --git a/src/gui/windows/serverdialog.cpp b/src/gui/windows/serverdialog.cpp index 5b0b557dc..ec4bbebbb 100644 --- a/src/gui/windows/serverdialog.cpp +++ b/src/gui/windows/serverdialog.cpp @@ -450,13 +450,13 @@ void ServerDialog::valueChanged(const SelectionEvent &) mDeleteButton->setEnabled(true); } -void ServerDialog::mouseClicked(MouseEvent &mouseEvent) +void ServerDialog::mouseClicked(MouseEvent &event) { - if (mouseEvent.getButton() == MouseEvent::LEFT) + if (event.getButton() == MouseEvent::LEFT) { - mouseEvent.consume(); - if (mouseEvent.getClickCount() == 2 && - mouseEvent.getSource() == mServersList) + event.consume(); + if (event.getClickCount() == 2 && + event.getSource() == mServersList) { action(ActionEvent(mConnectButton, mConnectButton->getActionEventId())); diff --git a/src/gui/windows/serverdialog.h b/src/gui/windows/serverdialog.h index 7c3a05ab3..60b84f089 100644 --- a/src/gui/windows/serverdialog.h +++ b/src/gui/windows/serverdialog.h @@ -81,7 +81,7 @@ class ServerDialog final : public Window, */ void valueChanged(const SelectionEvent &event) override final; - void mouseClicked(MouseEvent &mouseEvent) override final; + void mouseClicked(MouseEvent &event) override final; void logic() override final; |