public override void LoadContent()
 {
     base.Setup();
     Vector2 vector2 = new Vector2((float)(base.ScreenManager.GraphicsDevice.PresentationParameters.BackBufferWidth / 2 - 84), (float)(base.ScreenManager.GraphicsDevice.PresentationParameters.BackBufferHeight / 2 - 100));
     this.CategoriesRect = new Rectangle(this.r.X + 25, this.r.Y + 130, 330, 430);
     Submenu blah = new Submenu(base.ScreenManager, this.CategoriesRect);
     this.CategoriesSL = new ScrollList(blah, 40);
     this.TextRect = new Rectangle(this.CategoriesRect.X + this.CategoriesRect.Width + 5, this.CategoriesRect.Y + 10, 375, 420);
     Rectangle TextSLRect = new Rectangle(this.CategoriesRect.X + this.CategoriesRect.Width + 5, this.CategoriesRect.Y + 10, 375, 420);
     Submenu bler = new Submenu(base.ScreenManager, TextSLRect);
     this.TextSL = new ScrollList(bler, Fonts.Arial12Bold.LineSpacing + 2);
     this.SmallViewer = new Rectangle(this.TextRect.X + 20, this.TextRect.Y + 40, 336, 189);
     this.BigViewer = new Rectangle(base.ScreenManager.GraphicsDevice.PresentationParameters.BackBufferWidth / 2 - 640, base.ScreenManager.GraphicsDevice.PresentationParameters.BackBufferHeight / 2 - 360, 1280, 720);
     this.VideoPlayer = new Microsoft.Xna.Framework.Media.VideoPlayer();
     this.ActiveTopic = new HelpTopic()
     {
         Title = Localizer.Token(1401),
         Text = Localizer.Token(1400)
     };
     HelperFunctions.parseTextToSL(this.ActiveTopic.Text, (float)(this.TextRect.Width - 40), Fonts.Arial12Bold, ref this.TextSL);
     this.TitlePosition = new Vector2((float)(this.TextRect.X + this.TextRect.Width / 2) - Fonts.Arial20Bold.MeasureString(this.ActiveTopic.Title).X / 2f - 15f, (float)(this.TextRect.Y + 10));
     List<string> Categories = new List<string>();
     foreach (HelpTopic halp in this.ht.HelpTopicsList)
     {
         if (Categories.Contains(halp.Category))
         {
             continue;
         }
         Categories.Add(halp.Category);
         ModuleHeader mh = new ModuleHeader(halp.Category, 295f);
         this.CategoriesSL.AddItem(mh);
     }
     foreach (ScrollList.Entry e in this.CategoriesSL.Entries)
     {
         foreach (HelpTopic halp in this.ht.HelpTopicsList)
         {
             if (halp.Category != (e.item as ModuleHeader).Text)
             {
                 continue;
             }
             e.AddItem(halp);
         }
     }
     base.LoadContent();
 }
 public override void HandleInput(InputState input)
 {
     if (input.CurrentMouseState.RightButton == ButtonState.Pressed)
     {
         this.ExitScreen();
     }
     if (input.Escaped)
     {
         this.ExitScreen();
     }
     if (input.CurrentKeyboardState.IsKeyDown(Keys.P) && !input.LastKeyboardState.IsKeyDown(Keys.P) && !GlobalStats.TakingInput)
     {
         AudioManager.PlayCue("echo_affirm");
         this.ExitScreen();
     }
     this.CategoriesSL.HandleInput(input);
     this.TextSL.HandleInput(input);
     if (this.ActiveVideo != null)
     {
         if (this.VideoPlayer.State == MediaState.Paused)
         {
             if (!HelperFunctions.CheckIntersection(this.SmallViewer, input.CursorPosition))
             {
                 this.HoverSmallVideo = false;
             }
             else
             {
                 this.HoverSmallVideo = true;
                 if (input.InGameSelect)
                 {
                     this.VideoPlayer.Play(this.ActiveVideo);
                     base.ScreenManager.musicCategory.Pause();
                 }
             }
         }
         else if (this.VideoPlayer.State == MediaState.Playing)
         {
             this.HoverSmallVideo = false;
             if (HelperFunctions.CheckIntersection(this.BigViewer, input.CursorPosition) && input.InGameSelect)
             {
                 this.VideoPlayer.Pause();
                 base.ScreenManager.musicCategory.Resume();
             }
         }
     }
     for (int i = 0; i < this.CategoriesSL.Copied.Count; i++)
     {
         ScrollList.Entry e = this.CategoriesSL.Copied[i];
         if (e.item is ModuleHeader)
         {
             (e.item as ModuleHeader).HandleInput(input, e);
         }
         else if (!HelperFunctions.CheckIntersection(e.clickRect, input.CursorPosition))
         {
             e.clickRectHover = 0;
         }
         else
         {
             if (e.clickRectHover == 0)
             {
                 AudioManager.PlayCue("sd_ui_mouseover");
             }
             e.clickRectHover = 1;
             if (input.CurrentMouseState.LeftButton == ButtonState.Pressed && input.LastMouseState.LeftButton == ButtonState.Released && e.item is HelpTopic)
             {
                 this.TextSL.Entries.Clear();
                 this.TextSL.Copied.Clear();
                 this.TextSL.indexAtTop = 0;
                 this.ActiveTopic = e.item as HelpTopic;
                 if (this.ActiveTopic.Text != null)
                 {
                     HelperFunctions.parseTextToSL(this.ActiveTopic.Text, (float)(this.TextRect.Width - 40), Fonts.Arial12Bold, ref this.TextSL);
                     this.TitlePosition = new Vector2((float)(this.TextRect.X + this.TextRect.Width / 2) - Fonts.Arial20Bold.MeasureString(this.ActiveTopic.Title).X / 2f - 15f, this.TitlePosition.Y);
                 }
                 if (this.ActiveTopic.VideoPath == null)
                 {
                     this.ActiveVideo = null;
                     this.VideoPlayer = null;
                 }
                 else
                 {
                     this.TextSL.Copied.Clear();
                     this.VideoPlayer = new Microsoft.Xna.Framework.Media.VideoPlayer();
                     this.ActiveVideo = base.ScreenManager.Content.Load<Video>(string.Concat("Video/", this.ActiveTopic.VideoPath));
                     this.VideoPlayer.Play(this.ActiveVideo);
                     this.VideoPlayer.Pause();
                 }
             }
         }
     }
     base.HandleInput(input);
 }