Update RingRayLib - raylib.c - Add Function : bool IsMouseButtonReleased(int button)
@@ -1308,6 +1308,20 @@ RING_FUNC(ring_IsMouseButtonDown)
RING_API_RETNUMBER(IsMouseButtonDown( (int ) RING_API_GETNUMBER(1)));
}
+
+RING_FUNC(ring_IsMouseButtonReleased)
+{
+ if ( RING_API_PARACOUNT != 1 ) {
+ RING_API_ERROR(RING_API_MISS1PARA);
+ return ;
+ }
+ if ( ! RING_API_ISNUMBER(1) ) {
+ RING_API_ERROR(RING_API_BADPARATYPE);
+ return ;
+ }
+ RING_API_RETNUMBER(IsMouseButtonReleased( (int ) RING_API_GETNUMBER(1)));
+}
+
RING_API void ringlib_init(RingState *pRingState)
{
ring_vm_funcregister("initwindow",ring_InitWindow);
@@ -1406,4 +1420,5 @@ RING_API void ringlib_init(RingState *pRingState)
ring_vm_funcregister("getgamepadaxismovement",ring_GetGamepadAxisMovement);
ring_vm_funcregister("ismousebuttonpressed",ring_IsMouseButtonPressed);
ring_vm_funcregister("ismousebuttondown",ring_IsMouseButtonDown);
+ ring_vm_funcregister("ismousebuttonreleased",ring_IsMouseButtonReleased);
}
