Exemplo n.º 1
0
 /// <summary>
 /// sets the icon for the current window
 /// </summary>
 /// <param name="icon">the surface containing the image</param>
 /// <remarks>This should be called before Video.SetVideoMode</remarks>
 public static void WindowIcon(BaseSdlResource icon)
 {
     if (icon == null)
     {
         throw new ArgumentNullException("icon");
     }
     Video.Initialize();
     Sdl.SDL_WM_SetIcon(icon.Handle, null);
 }
Exemplo n.º 2
0
 /// <summary>
 /// Renders final frame of movie and puts it on a surface
 /// </summary>
 /// <param name="surface">surface to display frame to</param>
 public void RenderFinalFrame(BaseSdlResource surface)
 {
     if (surface == null)
     {
         throw new ArgumentNullException("surface");
     }
     if (this.Handle != IntPtr.Zero)
     {
         Smpeg.SMPEG_renderFinal(this.Handle, surface.Handle, 0, 0);
     }
 }
Exemplo n.º 3
0
        /// <summary>
        /// Fades in a sound the specified number of times on
        /// a specific channel, stopping after the specified number of ms
        /// </summary>
        /// <param name="sound">The sound to play</param>
        /// <param name="milliseconds">The number of milliseconds to fade in for
        /// </param>
        /// <param name="loops">The number of loops.
        /// Specify 1 to have the sound play twice</param>
        /// <param name="ticks">The time limit in milliseconds</param>
        /// <returns>The channel used to play the sound</returns>
        /// <remarks></remarks>
        public int FadeIn(BaseSdlResource sound, int milliseconds, int loops, int ticks)
        {
            if (sound == null)
            {
                throw new ArgumentNullException("sound");
            }
            int ret = SdlMixer.Mix_FadeInChannelTimed(this.index, sound.Handle, loops, milliseconds, ticks);

            if (ret == (int)SdlFlag.Error)
            {
                throw SdlException.Generate();
            }
            return(ret);
        }
Exemplo n.º 4
0
 /// <summary>
 /// Display video surface
 /// </summary>
 /// <param name="resource">Surface to display movie object on</param>
 public void Display(BaseSdlResource resource)
 {
     if (resource == null)
     {
         throw new ArgumentNullException("resource");
     }
     if (this.Handle != IntPtr.Zero)
     {
         Smpeg.SMPEG_setdisplay(
             this.Handle,
             resource.Handle,
             IntPtr.Zero, null);
     }
 }