Merging master (#3)

* REDESIGNED input system for better mouse/touch support

* Update Makefile

* Reviewed IsMouseButtonDown()

* Added comment on IsMouseButtonDown() issue

IsMouseButtonDown() does not process touch state down properly, state is reseted every frame...

* Update textures_mouse_painting.c

* Update raymath.h (#1118)

* Update raymath.h

Added Vector2Rotate Function.

* Update raymath.h

* Support touch drawing on web

* Review some comment

* Review shader exaples to work on web (GLSL 100)

* Support any mouse button for gesture detection

* Some code tweaks

* REVIEWED: Mouse/Touch input system

After several reviews, now it seems everything works as expected.

* Avoid icons in shell

Very weird... lately icons are not properly displayed on browser!

* Update core.c

* WARNING: Corrected issue with IsKeyDown() #1119

* ADDED: LoadFileText() and SaveFileText()

Improved file access checks

Co-authored-by: Ray <raysan5@gmail.com>
Co-authored-by: i-right-i <olmstead.ben@gmail.com>
This commit is contained in:
Tyler Jessilynn Bezera 2020-03-03 21:08:25 -08:00 • committed by GitHub
commit 035826a37b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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
@ -166,7 +166,7 @@ int main(void)
// Draw drawing circle for reference
if (mousePos.y > 50)
{
if (IsMouseButtonDown(MOUSE_RIGHT_BUTTON)) DrawCircleLines(mousePos.x, mousePos.y, brushSize, colors[colorSelected]);
if (IsMouseButtonDown(MOUSE_RIGHT_BUTTON)) DrawCircleLines(mousePos.x, mousePos.y, brushSize, GRAY);
else DrawCircle(GetMouseX(), GetMouseY(), brushSize, colors[colorSelected]);
}
@ -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();
//----------------------------------------------------------------------------------
}