diff options
Diffstat (limited to 'src/gui/windows/equipmentwindow.cpp')
-rw-r--r-- | src/gui/windows/equipmentwindow.cpp | 28 |
1 files changed, 14 insertions, 14 deletions
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) |