Ejemplo n.º 1
0
 /// <summary>Initializes a new instance of the <see cref="HelpManager" /> class.</summary>
 /// <param name="input">The input manager.</param>
 /// <param name="font">The font manager.</param>
 /// <param name="helpView">The help view start behavior.</param>
 public HelpManager(InputManager input, FontManager font, HelpViewTypes helpView = HelpViewTypes.Header)
 {
     this.input = input;
     this.HelpView = helpView;
     this.font = font;
     this.positionStep = new Vector2(0, this.font.Height);
 }
Ejemplo n.º 2
0
        /// <summary>Updates the specified input.</summary>
        public void Update(DistortionType distortion)
        {
            this.Distortion = distortion;
            if (this.input.IsKeyPressed(Keys.H) || this.input.IsKeyPressed(Keys.Help))
            {
                HelpViewTypes help;
                switch (this.HelpView)
                {
                    case HelpViewTypes.Header:
                        help = HelpViewTypes.Full;
                        break;
                    case HelpViewTypes.Full:
                        help = HelpViewTypes.Hidden;
                        break;
                    default:
                        help = HelpViewTypes.Header;
                        break;
                }

                this.HelpView = help;
            }
        }