소스 검색

Merge pull request #82 from procedural/disable-cursor

Disable cursor feature
pull/83/head
Ray 9 년 전
부모
커밋
4ec0ac89cd
2개의 변경된 파일20개의 추가작업 그리고 0개의 파일을 삭제
  1. +18
    -0
      src/core.c
  2. +2
    -0
      src/raylib.h

+ 18
- 0
src/core.c 파일 보기

@ -1097,6 +1097,24 @@ void ShowCursor()
cursorHidden = false;
}
// Disable mouse cursor
void DisableCursor()
{
#if defined(PLATFORM_DESKTOP)
glfwSetInputMode(window, GLFW_CURSOR, GLFW_CURSOR_DISABLED);
#endif
cursorHidden = true;
}
// Enable mouse cursor
void EnableCursor()
{
#if defined(PLATFORM_DESKTOP)
glfwSetInputMode(window, GLFW_CURSOR, GLFW_CURSOR_NORMAL);
#endif
cursorHidden = false;
}
// Check if mouse cursor is hidden
bool IsCursorHidden()
{

+ 2
- 0
src/raylib.h 파일 보기

@ -586,6 +586,8 @@ int GetMouseWheelMove(void); // Returns mouse wheel m
void ShowCursor(void); // Shows cursor
void HideCursor(void); // Hides cursor
void EnableCursor(void); // Enables cursor
void DisableCursor(void); // Disables cursor
bool IsCursorHidden(void); // Returns true if cursor is not visible
#endif

불러오는 중...
취소
저장