Beispiel #1
0
        public OpenGLCursor(UltravioletContext uv, Surface2D surface, Int32 hx, Int32 hy)
            : base(uv)
        {
            Contract.Require(surface, nameof(surface));

            uv.ValidateResource(surface);

            if (AreCursorsSupported(uv))
            {
                this.cursor = SDL.CreateColorCursor(((OpenGLSurface2D)surface).Native, hx, hy);
                this.Width = surface.Width;
                this.Height = surface.Height;
                this.HotspotX = hx;
                this.HotspotY = hy;

                if (this.cursor == null)
                {
                    this.Width = 0;
                    this.Height = 0;
                    this.HotspotX = 0;
                    this.HotspotY = 0;
                }
            }
            else
            {
                this.cursor = null;
                this.Width = 0;
                this.Height = 0;
            }
        }
Beispiel #2
0
 public static extern void SetCursor(SDL_Cursor *cursor);
Beispiel #3
0
 public static extern void FreeCursor(SDL_Cursor *cursor);
Beispiel #4
0
 public static void SDL_SetCursor(SDL_Cursor *cursor) => impl.SDL_SetCursor(cursor);
 public override sealed void SDL_SetCursor(SDL_Cursor *cursor) => INTERNAL_SDL_SetCursor(cursor);
 private static extern void INTERNAL_SDL_SetCursor(SDL_Cursor *cursor);
Beispiel #7
0
 public abstract void SDL_SetCursor(SDL_Cursor *cursor);
Beispiel #8
0
 public abstract void SDL_FreeCursor(SDL_Cursor *cursor);