From 03c74387d37cefcc18e59db203d17d78cda40e8e Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 18 May 2014 16:27:04 +0300 Subject: Move mousebutton into separate file. --- src/gui/widgets/spellshortcutcontainer.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/gui/widgets/spellshortcutcontainer.cpp') diff --git a/src/gui/widgets/spellshortcutcontainer.cpp b/src/gui/widgets/spellshortcutcontainer.cpp index 3c57d1034..4a4a5beb5 100644 --- a/src/gui/widgets/spellshortcutcontainer.cpp +++ b/src/gui/widgets/spellshortcutcontainer.cpp @@ -149,7 +149,7 @@ void SpellShortcutContainer::draw(Graphics *graphics) void SpellShortcutContainer::mouseDragged(MouseEvent &event) { - if (event.getButton() == MouseEvent::LEFT) + if (event.getButton() == MouseButton::LEFT) { if (dragDrop.isEmpty() && mSpellClicked) { @@ -186,17 +186,17 @@ void SpellShortcutContainer::mousePressed(MouseEvent &event) return; const unsigned int eventButton = event.getButton(); - if (eventButton == MouseEvent::LEFT) + if (eventButton == MouseButton::LEFT) { const int itemId = getItemByIndex(index); if (itemId > 0) mSpellClicked = true; event.consume(); } - else if (eventButton == MouseEvent::RIGHT) + else if (eventButton == MouseButton::RIGHT) { } - else if (eventButton == MouseEvent::MIDDLE) + else if (eventButton == MouseButton::MIDDLE) { if (!spellShortcut || !spellManager) return; @@ -223,7 +223,7 @@ void SpellShortcutContainer::mouseReleased(MouseEvent &event) const int itemId = getItemByIndex(index); const unsigned int eventButton = event.getButton(); - if (eventButton == MouseEvent::LEFT) + if (eventButton == MouseButton::LEFT) { mSpellClicked = false; @@ -275,7 +275,7 @@ void SpellShortcutContainer::mouseReleased(MouseEvent &event) } } } - else if (eventButton == MouseEvent::RIGHT) + else if (eventButton == MouseButton::RIGHT) { TextCommand *spell = nullptr; if (itemId >= 0) -- cgit v1.2.3-70-g09d2