Skip to content

Commit

Permalink
update windowhandler.d
Browse files Browse the repository at this point in the history
  • Loading branch information
ZILtoid1991 committed May 27, 2024
1 parent efa65e9 commit adabd82
Showing 1 changed file with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,17 @@ public class WindowHandler : InputListener, MouseListener, PopUpHandler {
* Sets the cursor to the given type.
*/
public CursorType setCursor(CursorType type) {
cursor = type;
sdlCursor = SDL_CreateSystemCursor(cast(SDL_SystemCursor)cursor);
SDL_SetCursor(sdlCursor);
if (cursor != type) {
cursor = type;
sdlCursor = SDL_CreateSystemCursor(cast(SDL_SystemCursor)cursor);
SDL_SetCursor(sdlCursor);
}
}
return cursor;
}
/**
* Resets cursor to the default type.
*/
public void resetCursor() {
setCursor(CursorType.Arrow);
}
Expand Down

0 comments on commit adabd82

Please sign in to comment.