Add support for a wait/hourglass cursor

This adds support for the wait/hourglass cursor with a Windows implementation using ICL_WAIT.
This commit is contained in:
httpdigest 2015-08-31 11:08:32 +02:00
parent da3a77b4e3
commit 7f9fff1ffe
3 changed files with 9 additions and 1 deletions

View File

@ -684,6 +684,11 @@ extern "C" {
* The vertical resize arrow shape. * The vertical resize arrow shape.
*/ */
#define GLFW_VRESIZE_CURSOR 0x00036006 #define GLFW_VRESIZE_CURSOR 0x00036006
/*! @brief The wait/hourglass shape.
*
* The wait/hourglass shape.
*/
#define GLFW_WAIT_CURSOR 0x00036007
/*! @} */ /*! @} */
#define GLFW_CONNECTED 0x00040001 #define GLFW_CONNECTED 0x00040001

View File

@ -389,7 +389,8 @@ GLFWAPI GLFWcursor* glfwCreateStandardCursor(int shape)
shape != GLFW_CROSSHAIR_CURSOR && shape != GLFW_CROSSHAIR_CURSOR &&
shape != GLFW_HAND_CURSOR && shape != GLFW_HAND_CURSOR &&
shape != GLFW_HRESIZE_CURSOR && shape != GLFW_HRESIZE_CURSOR &&
shape != GLFW_VRESIZE_CURSOR) shape != GLFW_VRESIZE_CURSOR &&
shape != GLFW_WAIT_CURSOR)
{ {
_glfwInputError(GLFW_INVALID_ENUM, "Invalid standard cursor"); _glfwInputError(GLFW_INVALID_ENUM, "Invalid standard cursor");
return NULL; return NULL;

View File

@ -148,6 +148,8 @@ static LPWSTR translateCursorShape(int shape)
return IDC_SIZEWE; return IDC_SIZEWE;
case GLFW_VRESIZE_CURSOR: case GLFW_VRESIZE_CURSOR:
return IDC_SIZENS; return IDC_SIZENS;
case GLFW_WAIT_CURSOR:
return IDC_WAIT;
} }
return NULL; return NULL;