Browse Source

Support touch drawing on web

pull/1120/head
Ray 6 years ago
parent
commit
a1b2d96d9c
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      examples/textures/textures_mouse_painting.c

+ 2
- 2
examples/textures/textures_mouse_painting.c View File

@ -106,7 +106,7 @@ int main(void)
EndTextureMode(); EndTextureMode();
} }
if (IsMouseButtonDown(MOUSE_LEFT_BUTTON))
if (IsMouseButtonDown(MOUSE_LEFT_BUTTON) || (GetGestureDetected() == GESTURE_DRAG))
{ {
// Paint circle into render texture // Paint circle into render texture
// NOTE: To avoid discontinuous circles, we could store // NOTE: To avoid discontinuous circles, we could store
@ -194,7 +194,7 @@ int main(void)
DrawRectangle(0, 150, GetScreenWidth(), 80, BLACK); DrawRectangle(0, 150, GetScreenWidth(), 80, BLACK);
DrawText("IMAGE SAVED: my_amazing_texture_painting.png", 150, 180, 20, RAYWHITE); DrawText("IMAGE SAVED: my_amazing_texture_painting.png", 150, 180, 20, RAYWHITE);
} }
EndDrawing(); EndDrawing();
//---------------------------------------------------------------------------------- //----------------------------------------------------------------------------------
} }

Loading…
Cancel
Save