diff options
| author | Doyle <[email protected]> | 2020-10-06 05:16:23 +1100 |
|---|---|---|
| committer | GitHub <[email protected]> | 2020-10-05 20:16:23 +0200 |
| commit | b29311c7cacf17b3512d837951d9e02fceae586f (patch) | |
| tree | 01d7e1f1461118861c7a1439a3aa39b199bbed19 /projects | |
| parent | a4ea9f872ffef9ffe66fade37e984c3cc97910cb (diff) | |
| download | raylib-b29311c7cacf17b3512d837951d9e02fceae586f.tar.gz raylib-b29311c7cacf17b3512d837951d9e02fceae586f.zip | |
mouse: Return float movement for precise scrolling where possible (#1397)
Diffstat (limited to 'projects')
| -rw-r--r-- | projects/Geany/raylib.c.tags | 2 | ||||
| -rw-r--r-- | projects/Notepad++/c_raylib.xml | 2 | ||||
| -rw-r--r-- | projects/Notepad++/raylib_npp_parser/raylib_npp.xml | 2 | ||||
| -rw-r--r-- | projects/Notepad++/raylib_npp_parser/raylib_to_parse.h | 2 | ||||
| -rw-r--r-- | projects/VS2017.UWP/raylib.App.UWP/App.cpp | 4 |
5 files changed, 6 insertions, 6 deletions
diff --git a/projects/Geany/raylib.c.tags b/projects/Geany/raylib.c.tags index 33864ca0..1b47efdd 100644 --- a/projects/Geany/raylib.c.tags +++ b/projects/Geany/raylib.c.tags @@ -103,7 +103,7 @@ GetMousePosition|Vector2|(void);| SetMousePosition|void|(int x, int y);| SetMouseOffset|void|(int offsetX, int offsetY);| SetMouseScale|void|(float scaleX, float scaleY);| -GetMouseWheelMove|int|(void);| +GetMouseWheelMove|float|(void);| GetTouchX|int|(void);| GetTouchY|int|(void);| GetTouchPosition|Vector2|(int index);| diff --git a/projects/Notepad++/c_raylib.xml b/projects/Notepad++/c_raylib.xml index e77d1edc..8deab87e 100644 --- a/projects/Notepad++/c_raylib.xml +++ b/projects/Notepad++/c_raylib.xml @@ -436,7 +436,7 @@ </Overload> </KeyWord> <KeyWord name="GetMouseWheelMove" func="yes"> - <Overload retVal="int" descr="Returns mouse wheel movement Y"></Overload> + <Overload retVal="float" descr="Returns mouse wheel movement Y"></Overload> </KeyWord> <!-- Input-related functions: touch --> diff --git a/projects/Notepad++/raylib_npp_parser/raylib_npp.xml b/projects/Notepad++/raylib_npp_parser/raylib_npp.xml index 06f1ee13..b5e9c69a 100644 --- a/projects/Notepad++/raylib_npp_parser/raylib_npp.xml +++ b/projects/Notepad++/raylib_npp_parser/raylib_npp.xml @@ -571,7 +571,7 @@ </Overload> </KeyWord> <KeyWord name="GetMouseWheelMove" func="yes"> - <Overload retVal="int" descr="Returns mouse wheel movement Y"></Overload> + <Overload retVal="float" descr="Returns mouse wheel movement Y"></Overload> </KeyWord> <!-- Input-related functions: touch --> diff --git a/projects/Notepad++/raylib_npp_parser/raylib_to_parse.h b/projects/Notepad++/raylib_npp_parser/raylib_to_parse.h index 1240cd5b..7ef12f93 100644 --- a/projects/Notepad++/raylib_npp_parser/raylib_to_parse.h +++ b/projects/Notepad++/raylib_npp_parser/raylib_to_parse.h @@ -147,7 +147,7 @@ RLAPI Vector2 GetMousePosition(void); // Returns mouse p RLAPI void SetMousePosition(int x, int y); // Set mouse position XY RLAPI void SetMouseOffset(int offsetX, int offsetY); // Set mouse offset RLAPI void SetMouseScale(float scaleX, float scaleY); // Set mouse scaling -RLAPI int GetMouseWheelMove(void); // Returns mouse wheel movement Y +RLAPI float GetMouseWheelMove(void); // Returns mouse wheel movement Y // Input-related functions: touch RLAPI int GetTouchX(void); // Returns touch position X for touch point 0 (relative to screen size) 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(); |
