14 Uint32 rmask, gmask, bmask, amask;
39 throw Exception(
"Cannot create cursor: %s", SDL_GetError());
45 , systemType(cursortype)
47 if (
auto i = systemCursorEntries.find(cursortype); i != systemCursorEntries.end())
48 cursor = SDL_CreateSystemCursor(i->second);
50 throw Exception(
"Cannot create system cursor: invalid type.");
53 throw Exception(
"Cannot create system cursor: %s", SDL_GetError());
59 SDL_FreeCursor(cursor);
67std::map<std::string, SDL_SystemCursor> Cursor::systemCursorEntries =
69 {
"ARROW", SDL_SYSTEM_CURSOR_ARROW},
70 {
"IBEAM", SDL_SYSTEM_CURSOR_IBEAM},
71 {
"WAIT", SDL_SYSTEM_CURSOR_WAIT},
72 {
"CROSSHAIR", SDL_SYSTEM_CURSOR_CROSSHAIR},
73 {
"WAITARROW", SDL_SYSTEM_CURSOR_WAITARROW},
74 {
"SIZENWSE", SDL_SYSTEM_CURSOR_SIZENWSE},
75 {
"SIZENESW", SDL_SYSTEM_CURSOR_SIZENESW},
76 {
"SIZEWE", SDL_SYSTEM_CURSOR_SIZEWE},
77 {
"SIZENS", SDL_SYSTEM_CURSOR_SIZENS},
78 {
"SIZEALL", SDL_SYSTEM_CURSOR_SIZEALL},
79 {
"NO", SDL_SYSTEM_CURSOR_NO},
80 {
"HAND", SDL_SYSTEM_CURSOR_HAND},