コード例 #1
0
        /// <summary>
        /// Sets the cursor to the given system cursor.
        /// </summary>
        /// <param name="cursor">The SDL cursor to set the system cursor to.</param>
        public static void SetCursor(SDL.SDL_SystemCursor cursor = SDL.SDL_SystemCursor.SDL_SYSTEM_CURSOR_ARROW)
        {
            if (Cursor == cursor)
            {
                return;
            }

            Cursor = cursor;
            SDL.SDL_SetCursor(Cursors[cursor]);
        }
コード例 #2
0
        public static IntPtr GetSDLCursor(SDL.SDL_SystemCursor system_cursor)
        {
            int cursor_id = (int)system_cursor;

            if (!_cursor.ContainsKey(cursor_id))
            {
                _cursor[cursor_id] = SDL.SDL_CreateSystemCursor(system_cursor);
            }

            return(_cursor[cursor_id]);
        }
コード例 #3
0
ファイル: SDLCursor.cs プロジェクト: coruscateor/SDL2-CS-OO
        public SDLCursor(SDL.SDL_SystemCursor Id)
        {
            myPtr = SDL.SDL_CreateSystemCursor(Id);

            CheckPtr();
        }
コード例 #4
0
 public override void SetCursorIBeam()
 {
     cursor = SDL.SDL_SystemCursor.SDL_SYSTEM_CURSOR_IBEAM;
 }
コード例 #5
0
 public override void SetCursorHand()
 {
     cursor = SDL.SDL_SystemCursor.SDL_SYSTEM_CURSOR_HAND;
 }
コード例 #6
0
 public override void SetCursorDefault()
 {
     cursor = SDL.SDL_SystemCursor.SDL_SYSTEM_CURSOR_ARROW;
 }