Esempio n. 1
0
		public MovieElement (UIScreen screen, BinElement el, byte[] palette, string resource)
			: base (screen, el, palette)
		{
			Sensitive = false;

			Player = new SmackerPlayer ((Stream)Mpq.GetResource (resource), 1);
		}
Esempio n. 2
0
		public MovieElement (UIScreen screen, BinElement el, byte[] palette, SmackerPlayer player)
			: base (screen, el, palette)
		{
			Sensitive = false;

			Player = player;
		}
Esempio n. 3
0
        public MovieElement(UIScreen screen, BinElement el, byte[] palette, SmackerPlayer player)
            : base(screen, el, palette)
        {
            Sensitive = false;

            Player = player;
        }
Esempio n. 4
0
        public MovieElement(UIScreen screen, BinElement el, byte[] palette, string resource)
            : base(screen, el, palette)
        {
            Sensitive = false;

            Player = new SmackerPlayer((Stream)Mpq.GetResource(resource), 1);
        }
Esempio n. 5
0
		public override void RemoveFromPainter ()
		{
			base.RemoveFromPainter ();

			player.Stop ();
			player = null;
			Painter.Remove (Layer.Background, VideoPainter);
		}
Esempio n. 6
0
        public override void RemoveFromPainter()
        {
            base.RemoveFromPainter();

            player.Stop();
            player = null;
            Painter.Remove(Layer.Background, VideoPainter);
        }
Esempio n. 7
0
		protected override void FirstPaint (object sender, EventArgs args)
		{
			base.FirstPaint (sender, args);

			player = new SmackerPlayer ((Stream)mpq.GetResource (resourcePath));

			player.Finished += PlayerFinished;
			player.FrameReady += PlayerFrameReady;
			player.Play ();
		}
Esempio n. 8
0
        protected override void FirstPaint(object sender, EventArgs args)
        {
            base.FirstPaint(sender, args);

            player = new SmackerPlayer((Stream)mpq.GetResource(resourcePath));

            player.Finished   += PlayerFinished;
            player.FrameReady += PlayerFrameReady;
            player.Play();
        }
Esempio n. 9
0
        void AddMovieElements(int elementIndex, int campaign, int off_x, int off_y)
        {
            MovieElement normalElement, onElement, diskElement;

            if (diskPlayer == null)
            {
                diskPlayer = new SmackerPlayer((Stream)Mpq.GetResource(Game.Instance.PlayingBroodWar ? "glue\\Expcampaign\\disk.smk" : "glue\\campaign\\disk.smk"), 1);
            }

            diskElement = new MovieElement(this,
                                           Elements[elementIndex].BinElement,
                                           Elements[elementIndex].Palette,
                                           diskPlayer);

            diskElement.X1 = (ushort)(Elements[elementIndex].X1 + ((Elements[elementIndex].Width - diskElement.MovieSize.Width) / 2));
            diskElement.Y1 = (ushort)(((ButtonElement)Elements[elementIndex]).TextPosition.Y - diskElement.MovieSize.Height);

            normalElement = new MovieElement(this,
                                             Elements[elementIndex].BinElement,
                                             Elements[elementIndex].Palette,
                                             (Game.Instance.PlayingBroodWar ? BroodwarCampaigns : StarcraftCampaigns)[campaign].normalMovie);

            normalElement.X1 = (ushort)(Elements[elementIndex].X1 + ((Elements[elementIndex].Width - normalElement.MovieSize.Width) / 2) + off_x);
            normalElement.Y1 = (ushort)(((ButtonElement)Elements[elementIndex]).TextPosition.Y - normalElement.MovieSize.Height + off_y);

            onElement = new MovieElement(this,
                                         Elements[elementIndex].BinElement,
                                         Elements[elementIndex].Palette,
                                         (Game.Instance.PlayingBroodWar ? BroodwarCampaigns : StarcraftCampaigns)[campaign].onMovie);

            onElement.X1 = (ushort)(Elements[elementIndex].X1 + ((Elements[elementIndex].Width - onElement.MovieSize.Width) / 2));
            onElement.Y1 = (ushort)(((ButtonElement)Elements[elementIndex]).TextPosition.Y - onElement.MovieSize.Height);

            smkElements.Add(diskElement);
            smkElements.Add(normalElement);
            smkElements.Add(onElement);

            onElement.Visible = false;
            normalElement.Dim(100);

            Elements[elementIndex].MouseEnterEvent +=
                delegate() {
                normalElement.Dim(0);
                onElement.Visible = true;
            };
            Elements[elementIndex].MouseLeaveEvent +=
                delegate() {
                normalElement.Dim(100);
                onElement.Visible = false;
            };
        }
Esempio n. 10
0
		void AddMovieElements (int elementIndex, int campaign, int off_x, int off_y)
		{
			MovieElement normalElement, onElement, diskElement;

			if (diskPlayer == null)
				diskPlayer = new SmackerPlayer ((Stream)Mpq.GetResource (Game.Instance.PlayingBroodWar ? "glue\\Expcampaign\\disk.smk" : "glue\\campaign\\disk.smk"), 1);

			diskElement = new MovieElement (this,
							Elements[elementIndex].BinElement,
							Elements[elementIndex].Palette,
							diskPlayer);

			diskElement.X1 = (ushort)(Elements[elementIndex].X1 + ((Elements[elementIndex].Width - diskElement.MovieSize.Width) / 2));
			diskElement.Y1 = (ushort)(((ButtonElement)Elements[elementIndex]).TextPosition.Y - diskElement.MovieSize.Height);

			normalElement = new MovieElement (this,
							  Elements[elementIndex].BinElement,
							  Elements[elementIndex].Palette,
							  (Game.Instance.PlayingBroodWar ? BroodwarCampaigns : StarcraftCampaigns)[campaign].normalMovie);

			normalElement.X1 = (ushort)(Elements[elementIndex].X1 + ((Elements[elementIndex].Width - normalElement.MovieSize.Width) / 2) + off_x);
			normalElement.Y1 = (ushort)(((ButtonElement)Elements[elementIndex]).TextPosition.Y - normalElement.MovieSize.Height + off_y);

			onElement = new MovieElement (this,
						      Elements[elementIndex].BinElement,
						      Elements[elementIndex].Palette,
						      (Game.Instance.PlayingBroodWar ? BroodwarCampaigns : StarcraftCampaigns)[campaign].onMovie);

			onElement.X1 = (ushort)(Elements[elementIndex].X1 + ((Elements[elementIndex].Width - onElement.MovieSize.Width) / 2));
			onElement.Y1 = (ushort)(((ButtonElement)Elements[elementIndex]).TextPosition.Y - onElement.MovieSize.Height);

			smkElements.Add (diskElement);
			smkElements.Add (normalElement);
			smkElements.Add (onElement);

			onElement.Visible = false;
			normalElement.Dim (100);

			Elements[elementIndex].MouseEnterEvent += 
				delegate () {
					normalElement.Dim (0);
					onElement.Visible = true;
				};
			Elements[elementIndex].MouseLeaveEvent += 
				delegate () {
					normalElement.Dim (100);
					onElement.Visible = false;
				};
		}
Esempio n. 11
0
        public override void RemoveFromPainter()
        {
            base.RemoveFromPainter ();
            foreach (MovieElement el in smkElements)
                el.Stop ();
            Painter.Remove (Layer.Background, smkPainter.Paint);

            diskPlayer = null;
        }