Created
August 30, 2017 04:14
-
-
Save Alan-FGR/3aa3152d00cd7aeab03babc0cf59f0ab to your computer and use it in GitHub Desktop.
Set hardware cursor in FNA
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
IntPtr surf = SDL2.SDL_image.IMG_Load("yourcursor.bmp"); // SDL_image supports most popular of formats | |
IntPtr cur = SDL2.SDL.SDL_CreateColorCursor(surf, 0, 0); // set hot spot (click pixel) | |
SDL2.SDL.SDL_SetCursor(cur); // actually sets the cursor | |
SDL2.SDL.SDL_ShowCursor(1); // just in case :P |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment