summaryrefslogtreecommitdiffhomepage
path: root/projects/VS2017.UWP/raylib.App.UWP/App.cpp
diff options
context:
space:
mode:
authorDoyle <[email protected]>2020-10-06 05:16:23 +1100
committerGitHub <[email protected]>2020-10-05 20:16:23 +0200
commitb29311c7cacf17b3512d837951d9e02fceae586f (patch)
tree01d7e1f1461118861c7a1439a3aa39b199bbed19 /projects/VS2017.UWP/raylib.App.UWP/App.cpp
parenta4ea9f872ffef9ffe66fade37e984c3cc97910cb (diff)
downloadraylib-b29311c7cacf17b3512d837951d9e02fceae586f.tar.gz
raylib-b29311c7cacf17b3512d837951d9e02fceae586f.zip
mouse: Return float movement for precise scrolling where possible (#1397)
Diffstat (limited to 'projects/VS2017.UWP/raylib.App.UWP/App.cpp')
-rw-r--r--projects/VS2017.UWP/raylib.App.UWP/App.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/projects/VS2017.UWP/raylib.App.UWP/App.cpp b/projects/VS2017.UWP/raylib.App.UWP/App.cpp
index bf1898a9..05bad920 100644
--- a/projects/VS2017.UWP/raylib.App.UWP/App.cpp
+++ b/projects/VS2017.UWP/raylib.App.UWP/App.cpp
@@ -213,7 +213,7 @@ void App::GameLoop()
DisableCursor();
}
- static int pos = 0;
+ static float pos = 0;
pos -= GetMouseWheelMove();
//----------------------------------------------------------------------------------
@@ -235,7 +235,7 @@ void App::GameLoop()
if (IsKeyDown(KEY_BACKSPACE)) DrawRectangle(280, 250, 20, 20, BLACK);
if (IsMouseButtonDown(MOUSE_LEFT_BUTTON)) DrawRectangle(280, 250, 20, 20, BLACK);
- DrawRectangle(280, pos + 50, 20, 20, BLACK);
+ DrawRectangle(280, (int)pos + 50, 20, 20, BLACK);
DrawRectangle(250, 280 + (gTime++ % 60), 10, 10, PURPLE);
EndDrawing();