summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/gui.cpp10
-rw-r--r--src/gui/sdlinput.cpp20
2 files changed, 15 insertions, 15 deletions
diff --git a/src/gui/gui.cpp b/src/gui/gui.cpp
index ab4ee5e19..b695b669b 100644
--- a/src/gui/gui.cpp
+++ b/src/gui/gui.cpp
@@ -984,19 +984,19 @@ void Gui::handleMouseInput()
#endif
switch (mouseInput.getType())
{
- case MouseInput::PRESSED:
+ case MouseEventType::PRESSED:
handleMousePressed(mouseInput);
break;
- case MouseInput::RELEASED:
+ case MouseEventType::RELEASED:
handleMouseReleased(mouseInput);
break;
- case MouseInput::MOVED:
+ case MouseEventType::MOVED:
handleMouseMoved(mouseInput);
break;
- case MouseInput::WHEEL_MOVED_DOWN:
+ case MouseEventType::WHEEL_MOVED_DOWN:
handleMouseWheelMovedDown(mouseInput);
break;
- case MouseInput::WHEEL_MOVED_UP:
+ case MouseEventType::WHEEL_MOVED_UP:
handleMouseWheelMovedUp(mouseInput);
break;
default:
diff --git a/src/gui/sdlinput.cpp b/src/gui/sdlinput.cpp
index aa8824bbd..846cb34f4 100644
--- a/src/gui/sdlinput.cpp
+++ b/src/gui/sdlinput.cpp
@@ -166,9 +166,9 @@ void SDLInput::pushInput(const SDL_Event &event)
#endif
mouseInput.setButton(static_cast<uint32_t>(-1));
if (y > 0)
- mouseInput.setType(MouseInput::WHEEL_MOVED_UP);
+ mouseInput.setType(MouseEventType::WHEEL_MOVED_UP);
else
- mouseInput.setType(MouseInput::WHEEL_MOVED_DOWN);
+ mouseInput.setType(MouseEventType::WHEEL_MOVED_DOWN);
mouseInput.setTimeStamp(SDL_GetTicks());
mMouseInputQueue.push(mouseInput);
}
@@ -204,12 +204,12 @@ void SDLInput::pushInput(const SDL_Event &event)
#ifndef USE_SDL2
if (event.button.button == SDL_BUTTON_WHEELDOWN)
- mouseInput.setType(MouseInput::WHEEL_MOVED_DOWN);
+ mouseInput.setType(MouseEventType::WHEEL_MOVED_DOWN);
else if (event.button.button == SDL_BUTTON_WHEELUP)
- mouseInput.setType(MouseInput::WHEEL_MOVED_UP);
+ mouseInput.setType(MouseEventType::WHEEL_MOVED_UP);
else
#endif
- mouseInput.setType(MouseInput::PRESSED);
+ mouseInput.setType(MouseEventType::PRESSED);
mouseInput.setTimeStamp(SDL_GetTicks());
mMouseInputQueue.push(mouseInput);
break;
@@ -231,7 +231,7 @@ void SDLInput::pushInput(const SDL_Event &event)
#endif
#endif
mouseInput.setButton(convertMouseButton(event.button.button));
- mouseInput.setType(MouseInput::RELEASED);
+ mouseInput.setType(MouseEventType::RELEASED);
mouseInput.setTimeStamp(SDL_GetTicks());
mMouseInputQueue.push(mouseInput);
break;
@@ -252,7 +252,7 @@ void SDLInput::pushInput(const SDL_Event &event)
#endif
#endif
mouseInput.setButton(MouseButton::EMPTY);
- mouseInput.setType(MouseInput::MOVED);
+ mouseInput.setType(MouseEventType::MOVED);
mouseInput.setTimeStamp(SDL_GetTicks());
mMouseInputQueue.push(mouseInput);
break;
@@ -272,7 +272,7 @@ void SDLInput::pushInput(const SDL_Event &event)
mouseInput.setX(-1);
mouseInput.setY(-1);
mouseInput.setButton(MouseButton::EMPTY);
- mouseInput.setType(MouseInput::MOVED);
+ mouseInput.setType(MouseEventType::MOVED);
mMouseInputQueue.push(mouseInput);
}
}
@@ -531,10 +531,10 @@ void SDLInput::simulateMouseClick(const int x, const int y,
mouseInput.setY(y);
mouseInput.setReal(x, y);
mouseInput.setButton(button);
- mouseInput.setType(MouseInput::PRESSED);
+ mouseInput.setType(MouseEventType::PRESSED);
mouseInput.setTimeStamp(SDL_GetTicks());
mMouseInputQueue.push(mouseInput);
- mouseInput.setType(MouseInput::RELEASED);
+ mouseInput.setType(MouseEventType::RELEASED);
mouseInput.setTimeStamp(SDL_GetTicks());
mMouseInputQueue.push(mouseInput);
}