Example #1
0
 public static void ToggleVideo()
 {
     if (_Video != -1)
     {
         if (_VideoEnabled)
         {
             _VideoEnabled = false;
             CVideo.VdClose(_Video);
             _Video = -1;
             CDraw.RemoveTexture(ref _CurrentVideoTexture);
             return;
         }
         if (CVideo.VdFinished(_Video))
         {
             CVideo.VdClose(_Video);
             CDraw.RemoveTexture(ref _CurrentVideoTexture);
             _Video = -1;
             return;
         }
     }
     else
     {
         LoadVideo();
     }
 }
Example #2
0
 public void Close()
 {
     CVideo.VdClose(_VideoStream);
     CDraw.RemoveTexture(ref _VideoTexture);
     _Loaded   = false;
     _Finished = false;
     _VideoTimer.Reset();
 }
Example #3
0
        public static void Stop()
        {
            if (!_Playing)
            {
                return;
            }

            if (_VideoEnabled && _Video != -1)
            {
                CVideo.VdClose(_Video);
                CDraw.RemoveTexture(ref _CurrentVideoTexture);
                _Video = -1;
            }
            CSound.FadeAndStop(_CurrentMusicStream, 0f, CSettings.BackgroundMusicFadeTime);

            _CurrentPlaylistElement = new PlaylistElement();
            _Playing = false;
        }
Example #4
0
        public static void UnloadSkins()
        {
            for (int i = 0; i < _Skins.Count; i++)
            {
                foreach (SkinElement sk in _Skins[i].SkinList.Values)
                {
                    STexture Texture = sk.Texture;
                    CDraw.RemoveTexture(ref Texture);
                }

                for (int j = 0; j < _Skins[i].VideoList.Count; j++)
                {
                    CVideo.VdClose(_Skins[i].VideoList[j].VideoIndex);
                    STexture VideoTexture = _Skins[i].VideoList[j].Texture;
                    CDraw.RemoveTexture(ref VideoTexture);
                }
            }
            _Skins.Clear();
        }