|
|
@@ -103,6 +103,7 @@ void InputSystem::PrepareForUpdate()
|
|
|
// Mouse
|
|
|
mState.Mouse.mPrevButtons = mState.Mouse.mCurrButtons;
|
|
|
mState.Mouse.mIsRelative = false;
|
|
|
+ mState.Mouse.mScrollWheel = Vector2::Zero;
|
|
|
}
|
|
|
|
|
|
void InputSystem::Update()
|
|
|
@@ -124,6 +125,20 @@ void InputSystem::Update()
|
|
|
mState.Mouse.mMousePos.y = static_cast<float>(y);
|
|
|
}
|
|
|
|
|
|
+void InputSystem::ProcessEvent(SDL_Event& event)
|
|
|
+{
|
|
|
+ switch (event.type)
|
|
|
+ {
|
|
|
+ case SDL_MOUSEWHEEL:
|
|
|
+ mState.Mouse.mScrollWheel = Vector2(
|
|
|
+ static_cast<float>(event.wheel.x),
|
|
|
+ static_cast<float>(event.wheel.y));
|
|
|
+ break;
|
|
|
+ default:
|
|
|
+ break;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
void InputSystem::SetRelativeMouseMode(bool value)
|
|
|
{
|
|
|
SDL_bool set = value ? SDL_TRUE : SDL_FALSE;
|