Exemple #1
0
        public void Load()
        {
            if (Loaded)
            {
                return;
            }

            if (IsSystemCursor)
            {
                CursorHandle = SDL.CreateSystemCursor((SDL.SystemCursor)SystemCursor);
            }
            else
            {
                CursorHandle = SDL.CreateColorCursor(IMG.Load_RW(Resources.CreateRWFromFile(Filename, FileAssembly), 1), (int)Origin.X, (int)Origin.Y);
            }

            if (CursorHandle != IntPtr.Zero)
            {
                Loaded = true;
            }
            else
            {
                throw new FileLoadException();
            }
        }