From a1b2d96d9cfe4c04f05a45479049215c55846db4 Mon Sep 17 00:00:00 2001 From: Ray Date: Mon, 2 Mar 2020 12:22:38 +0100 Subject: [PATCH] Support touch drawing on web --- examples/textures/textures_mouse_painting.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/textures/textures_mouse_painting.c b/examples/textures/textures_mouse_painting.c index af1f3887..dedb8df3 100644 --- a/examples/textures/textures_mouse_painting.c +++ b/examples/textures/textures_mouse_painting.c @@ -106,7 +106,7 @@ int main(void) EndTextureMode(); } - if (IsMouseButtonDown(MOUSE_LEFT_BUTTON)) + if (IsMouseButtonDown(MOUSE_LEFT_BUTTON) || (GetGestureDetected() == GESTURE_DRAG)) { // Paint circle into render texture // NOTE: To avoid discontinuous circles, we could store @@ -194,7 +194,7 @@ int main(void) DrawRectangle(0, 150, GetScreenWidth(), 80, BLACK); DrawText("IMAGE SAVED: my_amazing_texture_painting.png", 150, 180, 20, RAYWHITE); } - + EndDrawing(); //---------------------------------------------------------------------------------- }