Exemple #1
0
        private void Art_Image_Preview_MouseLeftButtonUp(object sender, MouseButtonEventArgs e)
        {
            var image    = sender as Image;
            var row      = Grid.GetRow(image) == 2 ? 1 : 0;
            var col      = Grid.GetColumn(image);
            var isOpened = this.OpenVect[row, col];

            if (isOpened)
            {
                viewSprite = rm.GetPicture("CG_" + (row * 4 + col + 1) + ".png", ResourceManager.FullImageRect);
                SpriteDescriptor desc = new SpriteDescriptor()
                {
                    ResourceType = ResourceType.Pictures
                };
                viewSprite.Descriptor         = desc;
                this.Art_Image_Viewbox.Margin = new Thickness(0, 0, 0, 0);
                this.RollCounter = 0;
                this.Art_Image_Viewbox.Source     = viewSprite.SpriteBitmapImage;
                this.Art_Image_Viewbox.Visibility = Visibility.Visible;
                this.Art_Image_Viewbox.Opacity    = 0;
                desc.ToOpacity            = 1;
                viewSprite.DisplayBinding = viewSprite.AnimationElement = this.Art_Image_Viewbox;
                SpriteAnimation.OpacityToAnimation(viewSprite, TimeSpan.FromMilliseconds(500), 1);
                if (GlobalConfigContext.GAME_PERFORMANCE_TYPE == GlobalConfigContext.PerformanceType.HighQuality)
                {
                    SpriteAnimation.BlurMutexAnimation(canvasSprite, TimeSpan.FromMilliseconds(800), 0, 50);
                }
                this.Art_Grid_Controls.IsHitTestVisible = false;
            }
        }
Exemple #2
0
 private void Art_Image_Viewbox_MouseLeftButtonUp(object sender, MouseButtonEventArgs e)
 {
     this.Art_Image_Viewbox.Source           = null;
     this.Art_Image_Viewbox.Visibility       = Visibility.Hidden;
     this.Art_Grid_Controls.IsHitTestVisible = true;
     if (GlobalConfigContext.GAME_PERFORMANCE_TYPE == GlobalConfigContext.PerformanceType.HighQuality)
     {
         SpriteAnimation.BlurMutexAnimation(canvasSprite, TimeSpan.FromMilliseconds(300), 50, 0);
     }
 }
Exemple #3
0
        private void transitToGalleryPanel(bool withWindow)
        {
            this.GalleryContentWarpSprite.DisplayBinding.Visibility       = Visibility.Hidden;
            this.GalleryContentWarpSprite.DisplayBinding.IsHitTestVisible = false;

            this.Grid_WarpHolder.IsHitTestVisible = false;
            this.Canvas_Gallery.Visibility        = Visibility.Visible;
            this.Canvas_Gallery.IsHitTestVisible  = false;

            this.GalleryContentWarpSprite.Descriptor.ToOpacity = 0;
            SpriteAnimation.OpacityToAnimation(this.GalleryContentWarpSprite, new Duration(TimeSpan.Zero), 0, 0);
            this.GalleryWarpSprite.Descriptor.ToOpacity = 0;
            SpriteAnimation.OpacityToAnimation(this.GalleryWarpSprite, new Duration(TimeSpan.Zero), 0, 0);

            Storyboard sb = new Storyboard();

            if (withWindow)
            {
                this.BackGroundSprite.Descriptor.ToScaleX  = 1.2;
                this.BackGroundSprite.Descriptor.ToScaleY  = 1.2;
                this.BackGroundSprite.Descriptor.ToOpacity = 0;
                SpriteAnimation.ScaleToAnimation(this.BackGroundSprite, new Duration(TimeSpan.FromMilliseconds(300)), 1.2, 1.2, 0.6, 0.6, providedStory: sb);
                SpriteAnimation.OpacityToAnimation(this.BackGroundSprite, new Duration(TimeSpan.FromMilliseconds(300)), 0, 0.6, providedStory: sb);
            }

            this.ForeGroundSprite.Descriptor.ToScaleX  = 1.4;
            this.ForeGroundSprite.Descriptor.ToScaleY  = 1.4;
            this.ForeGroundSprite.Descriptor.ToOpacity = 0;
            SpriteAnimation.ScaleToAnimation(this.ForeGroundSprite, new Duration(TimeSpan.FromMilliseconds(300)), 1.4, 1.4, 0.6, 0.6, providedStory: sb);
            SpriteAnimation.OpacityToAnimation(this.ForeGroundSprite, new Duration(TimeSpan.FromMilliseconds(300)), 0, 0.6, providedStory: sb);
            SpriteAnimation.BlurMutexAnimation(this.ForeGroundSprite, new Duration(TimeSpan.FromMilliseconds(300)), 0, 20, providedStory: sb);

            this.RootButtonSprite.Descriptor.ToOpacity = 0;
            SpriteAnimation.OpacityToAnimation(this.RootButtonSprite, new Duration(TimeSpan.FromMilliseconds(300)), 0, 0.6, providedStory: sb);

            this.GalleryWarpSprite.Descriptor.ToOpacity = 1;
            SpriteAnimation.OpacityToAnimation(this.GalleryWarpSprite, new Duration(TimeSpan.FromMilliseconds(300)), 1, -0.6, providedStory: sb);

            sb.Completed += (_, __) =>
            {
                this.currentSubStage = "gallery";
                this.Canvas_Gallery.IsHitTestVisible = true;
            };

            sb.Begin();
        }
Exemple #4
0
        public void PrepareOpen()
        {
            this.currentStaging                    = "root";
            this.isResumingFromLoad                = false;
            this.IsFromAutoChanged                 = false;
            this.IsFromReturnTitle                 = false;
            this.Image_Button_Auto.Visibility      = Visibility.Visible;
            this.CanvasGroup_EnsureMask.Visibility = Visibility.Hidden;

            // 检查回调标志位
            CallbackTarget       = SymbolTable.GetInstance().GlobalCtxDao.GlobalSymbolTable.Fetch("tracing_callback").ToString();
            this.EpisodeHint     = SymbolTable.GetInstance().GlobalCtxDao.GlobalSymbolTable.Fetch("gb_episode_hint")?.ToString();
            this.EpisodeNameHint = SymbolTable.GetInstance().GlobalCtxDao.GlobalSymbolTable.Fetch("gb_episode_name_hint")?.ToString();
            this.ReopenTs        = DateTime.Now;

            this.Label_Hint_Episode.Content = this.EpisodeHint;
            this.Label_Hint_EpName.Content  = this.EpisodeNameHint;

            Storyboard startupSb = new Storyboard();

            this.PanelSprite.Descriptor.ToX = 1762;
            SpriteAnimation.XMoveToAnimation(this.PanelSprite, new Duration(TimeSpan.FromMilliseconds(300)), 1762, -0.8, providedStory: startupSb);

            this.NameLogoSprite.Descriptor.ToOpacity = 1;
            SpriteAnimation.OpacityToAnimation(this.NameLogoSprite, new Duration(TimeSpan.FromMilliseconds(300)), 1, 0, providedStory: startupSb);
            this.EpisodeHintSprite.Descriptor.ToOpacity = 1;
            SpriteAnimation.OpacityToAnimation(this.EpisodeHintSprite, new Duration(TimeSpan.FromMilliseconds(300)), 1, 0, providedStory: startupSb);
            this.ButtonGroupSprite.Descriptor.ToOpacity = 1;
            this.ButtonGroupSprite.Descriptor.ToY       = 1080 / 2;
            SpriteAnimation.OpacityToAnimation(this.ButtonGroupSprite, new Duration(TimeSpan.FromMilliseconds(300)), 1, 0, providedStory: startupSb);
            SpriteAnimation.YMoveToAnimation(this.ButtonGroupSprite, new Duration(TimeSpan.FromMilliseconds(300)), 1080 / 2, -0.8, providedStory: startupSb);

            SpriteAnimation.BlurMutexAnimation(this.MainStageSprite, TimeSpan.FromMilliseconds(300), 0, 30, providedStory: startupSb);
            this.currentStaging  = "root";
            startupSb.Completed += (_, __) =>
            {
                this.IsAllowClose = true;
            };

            if (this.core.GetMainRender().IsBranching)
            {
                this.Image_Button_Auto.Visibility = Visibility.Hidden;
            }

            startupSb.Begin();
        }
 private void Blur_OnClick(object sender, RoutedEventArgs e)
 {
     if (blurCount == -1)
     {
         Blursd = new SpriteDescriptor()
         {
             ResourceType = ResourceType.Pictures
         };
         var rm = ResourceManager.GetInstance();
         Blurbgg = rm.GetPicture("UUZ.jpg", ResourceManager.FullImageRect);
         Image img3 = new Image();
         img3.Source              = Blurbgg.SpriteBitmapImage;
         img3.Width               = Blurbgg.SpriteBitmapImage.PixelWidth;
         img3.Height              = Blurbgg.SpriteBitmapImage.PixelHeight;
         Blurbgg.DisplayBinding   = img3;
         Blurbgg.AnimationElement = img3;
         Blurbgg.Descriptor       = Blursd;
         Canvas.SetLeft(img3, 0);
         Canvas.SetTop(img3, 0);
         Canvas.SetZIndex(img3, 5);
         this.BO_Bg_Canvas.Children.Add(img3);
         Blurbgg.InitAnimationRenderTransform();
         Blursd.BlurRadius   = 0;
         Blursd.ToBlurRadius = 20;
     }
     else if (blurCount % 2 == 0)
     {
         Blursd.ToBlurRadius = 50;
         SpriteAnimation.BlurMutexAnimation(Blurbgg, TimeSpan.FromMilliseconds(1000), Blursd.BlurRadius, Blursd.ToBlurRadius);
     }
     else
     {
         Blursd.ToBlurRadius = 0;
         SpriteAnimation.BlurMutexAnimation(Blurbgg, TimeSpan.FromMilliseconds(1000), Blursd.BlurRadius, Blursd.ToBlurRadius);
     }
     blurCount++;
 }
Exemple #6
0
 private void Page_PreviewMouseRightButtonUp(object sender, MouseButtonEventArgs e)
 {
     if (e != null)
     {
         this.core.UpdateMouse(e);
     }
     if (this.isResumingFromLoad || (!SpriteAnimation.IsAnyAnimation && this.IsAllowClose))
     {
         if (this.currentStaging == "root")
         {
             this.IsAllowClose = false;
             if (CallbackTarget != String.Empty)
             {
                 var callbackNtr = new Interrupt()
                 {
                     Detail       = "LHRCCallbackNTR",
                     InterruptSA  = null,
                     Type         = InterruptType.ButtonJump,
                     ReturnTarget = CallbackTarget,
                     ExitWait     = true
                 };
                 // 提交返回主舞台的中断到主调用堆栈
                 Director.RunMana.CallStack.Submit(callbackNtr);
                 // 重置回调
                 CallbackTarget = String.Empty;
                 Director.RunMana.Symbols.GlobalCtxDao.GlobalSymbolTable.Assign("tracing_callback", String.Empty);
             }
             Storyboard closeSb = new Storyboard();
             this.PanelSprite.Descriptor.ToX = 1920 + 1920 / 2;
             SpriteAnimation.XMoveToAnimation(this.PanelSprite, new Duration(TimeSpan.FromMilliseconds(150)), 1920 + 1920 / 2, -0.8, providedStory: closeSb);
             this.NameLogoSprite.Descriptor.ToOpacity = 0;
             SpriteAnimation.OpacityToAnimation(this.NameLogoSprite, new Duration(TimeSpan.FromMilliseconds(150)), 0, 0, providedStory: closeSb);
             this.EpisodeHintSprite.Descriptor.ToOpacity = 0;
             SpriteAnimation.OpacityToAnimation(this.EpisodeHintSprite, new Duration(TimeSpan.FromMilliseconds(150)), 0, 0, providedStory: closeSb);
             this.ButtonGroupSprite.Descriptor.ToOpacity = 0;
             this.ButtonGroupSprite.Descriptor.ToY       = 1080 / 2 + 50;
             SpriteAnimation.OpacityToAnimation(this.ButtonGroupSprite, new Duration(TimeSpan.FromMilliseconds(150)), 0, 0, providedStory: closeSb);
             SpriteAnimation.YMoveToAnimation(this.ButtonGroupSprite, new Duration(TimeSpan.FromMilliseconds(150)), 1080 / 2 + 25, 0, providedStory: closeSb);
             SpriteAnimation.BlurMutexAnimation(this.MainStageSprite, TimeSpan.FromMilliseconds(300), 0, 0, providedStory: closeSb);
             closeSb.Completed += (_, __) =>
             {
                 this.PrepareClose();
                 this.core.GetMainRender().ResumeFromRclick();
                 if (this.IsFromAutoChanged)
                 {
                     RollbackManager.IsRollingBack  = false;
                     Director.RunMana.IsAutoplaying = true;
                     Director.RunMana.ExitUserWait();
                     Director.RunMana.AutoPlayWait();
                     this.core.GetMainRender().HideMessageTria();
                     NotificationManager.Notify(String.Empty, "已启用自动播放", String.Empty, 1500);
                     this.IsFromAutoChanged = false;
                 }
                 else if (this.IsFromReturnTitle)
                 {
                     this.IsFromReturnTitle = false;
                     this.core.GetMainRender().Title();
                 }
             };
             closeSb.Begin();
         }
         else if (this.currentStaging == "backlog")
         {
             this.HandleBackward((_, __) => this.currentStaging = "root");
         }
         else if (this.currentStaging == "save")
         {
             this.HandleBackward((_, __) => this.currentStaging = "root");
         }
         else if (this.currentStaging == "load")
         {
             this.HandleBackward((_, __) => this.currentStaging = "root");
         }
         else if (this.currentStaging == "settings")
         {
             this.HandleBackward((_, __) => this.currentStaging = "root");
         }
     }
 }