diff options
| author | Ray <[email protected]> | 2020-03-02 12:22:38 +0100 |
|---|---|---|
| committer | Ray <[email protected]> | 2020-03-02 12:22:38 +0100 |
| commit | a1b2d96d9cfe4c04f05a45479049215c55846db4 (patch) | |
| tree | 923ad7db0c385873bd07d617a51fe0eb11ab7564 /examples/textures | |
| parent | 3c2ee1cc75ebd59bee343cdc28902b431a599db6 (diff) | |
| download | raylib-a1b2d96d9cfe4c04f05a45479049215c55846db4.tar.gz raylib-a1b2d96d9cfe4c04f05a45479049215c55846db4.zip | |
Support touch drawing on web
Diffstat (limited to 'examples/textures')
| -rw-r--r-- | examples/textures/textures_mouse_painting.c | 4 |
1 files 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(); //---------------------------------------------------------------------------------- } |
