mirror of
https://github.com/Not-Nik/raylib-zig.git
synced 2025-09-09 12:07:27 +00:00
Fix mouse input example
This commit is contained in:
parent
8ae2cefd4c
commit
1e4b02ad1b
@ -28,6 +28,8 @@ pub fn main() anyerror!void
|
||||
// Update
|
||||
//----------------------------------------------------------------------------------
|
||||
ballPosition = GetMousePosition();
|
||||
ballPosition.x = @intToFloat(f32, GetMouseX());
|
||||
ballPosition.y = @intToFloat(f32, GetMouseY());
|
||||
|
||||
if (IsMouseButtonPressed(MouseButton.MOUSE_LEFT_BUTTON)) { ballColor = MAROON; }
|
||||
else if (IsMouseButtonPressed(MouseButton.MOUSE_MIDDLE_BUTTON)) { ballColor = LIME; }
|
||||
|
Loading…
x
Reference in New Issue
Block a user