Explorar el Código

Added bool IsCursorOnScreen(void). (#1262)

- The Mouse struct already stores cursorOnScreen. This function simply exposes it to the usage code.
pull/1263/head
ChrisDill hace 5 años
cometido por GitHub
padre
commit
aff47d1564
No se encontró ninguna clave conocida en la base de datos para esta firma ID de clave GPG: 4AEE18F83AFDEB23
Se han modificado 2 ficheros con 7 adiciones y 0 borrados
  1. +6
    -0
      src/core.c
  2. +1
    -0
      src/raylib.h

+ 6
- 0
src/core.c Ver fichero

@ -1318,6 +1318,12 @@ void DisableCursor(void)
CORE.Input.Mouse.cursorHidden = true; CORE.Input.Mouse.cursorHidden = true;
} }
// Check if cursor is on the current screen.
bool IsCursorOnScreen(void)
{
return CORE.Input.Mouse.cursorOnScreen;
}
// Set background color (framebuffer clear color) // Set background color (framebuffer clear color)
void ClearBackground(Color color) void ClearBackground(Color color)
{ {

+ 1
- 0
src/raylib.h Ver fichero

@ -903,6 +903,7 @@ RLAPI void HideCursor(void); // Hides curso
RLAPI bool IsCursorHidden(void); // Check if cursor is not visible RLAPI bool IsCursorHidden(void); // Check if cursor is not visible
RLAPI void EnableCursor(void); // Enables cursor (unlock cursor) RLAPI void EnableCursor(void); // Enables cursor (unlock cursor)
RLAPI void DisableCursor(void); // Disables cursor (lock cursor) RLAPI void DisableCursor(void); // Disables cursor (lock cursor)
RLAPI bool IsCursorOnScreen(void); // Check if cursor is on the current screen.
// Drawing-related functions // Drawing-related functions
RLAPI void ClearBackground(Color color); // Set background color (framebuffer clear color) RLAPI void ClearBackground(Color color); // Set background color (framebuffer clear color)

Cargando…
Cancelar
Guardar