Exemplo n.º 1
0
 protected internal override void OnDispose()
 {
     base.OnDispose();
     if (this._texture != null)
     {
         this._texture.Dispose();
         this._texture = (Texture)null;
     }
     if (this._video == null)
     {
         return;
     }
     this._video.Dispose();
     this._video = (Playback)null;
 }
Exemplo n.º 2
0
            protected internal override void Draw(int x, int y)
            {
                Playback playback = this._owner._video;
                int      num      = (int)(playback.Elapsed.Ticks * (long)this.Width / playback.Duration.Ticks);

                if (num > this.Width)
                {
                    num = this.Width;
                }
                if (num <= 4)
                {
                    return;
                }
                this._textures[0].Draw(x, y);
                this._textures[1].Draw(x + 2, y, num - 4, this._textures[1].Height);
                this._textures[2].Draw(x + num - 2, y);
            }
Exemplo n.º 3
0
 public VideoPlaybackGump(Playback video)
     : base(0, 0)
 {
     this._video      = video;
     this.m_CanDrag   = true;
     this.m_QuickDrag = true;
     this._texture    = Engine.LoadArchivedTexture("video-window.png");
     this.Children.Add((Gump) new VideoPlaybackGump.VideoSpeedBar(this));
     this.Children.Add((Gump) new VideoPlaybackGump.VideoTimeLabel(this));
     this.Children.Add((Gump) new VideoPlaybackGump.VideoProgressBar(this));
     using (Bitmap buttonSource = Engine.LoadArchivedBitmap("video-buttons.png"))
     {
         using (Bitmap iconSource = Engine.LoadArchivedBitmap("video-button-status.png"))
         {
             for (int type = 1; type < 4; ++type)
             {
                 this.Children.Add((Gump) new VideoPlaybackGump.VideoPlaybackButton(this, buttonSource, iconSource, type));
             }
         }
     }
 }
Exemplo n.º 4
0
 public FadeEffect(Playback video)
     : base(0, 0.0f, 1f, 2f)
 {
     this._video = video;
 }