mirror of
https://github.com/HowestDAE/dae16-VerhulstBram.git
synced 2025-12-16 14:41:49 +01:00
Add basic controller Support
Fix more memory leaks (seeing a trend here)
This commit is contained in:
@@ -90,14 +90,6 @@ void Game::ProcessMouseUpEvent(const SDL_MouseButtonEvent& e) {
|
||||
//}
|
||||
}
|
||||
void Game::ProcessMouseWheelEvent(const SDL_MouseWheelEvent& e) {
|
||||
Vector2f scroll = Vector2f { 0, 0 };
|
||||
if (e.y > 0) {
|
||||
scroll = Vector2f { 0, 1 };
|
||||
}
|
||||
else if (e.y < 0) {
|
||||
scroll = Vector2f { 0, -1 };
|
||||
}
|
||||
//camera zoom
|
||||
float newScale = m_Camera.GetScale() - e.preciseY * 0.1f;
|
||||
if(newScale < 0.0f) {
|
||||
newScale = 0.0f;
|
||||
|
||||
Reference in New Issue
Block a user