using System;

namespace SharpQuake
{
	internal class HelpMenu : MenuBase
	{
		public override void Show()
		{
			this._Page = 0;
			base.Show();
		}

		public override void KeyEvent(int key)
		{
			if (key != 27)
			{
				switch (key)
				{
				case 128:
				case 131:
				{
					menu.EnterSound = true;
					int num = this._Page + 1;
					this._Page = num;
					if (num >= 6)
					{
						this._Page = 0;
						return;
					}
					break;
				}
				case 129:
				case 130:
				{
					menu.EnterSound = true;
					int num = this._Page - 1;
					this._Page = num;
					if (num < 0)
					{
						this._Page = 5;
					}
					break;
				}
				default:
					return;
				}
				return;
			}
			MenuBase.MainMenu.Show();
		}

		public override void Draw()
		{
			menu.DrawPic(0, 0, Drawer.CachePic(string.Format("gfx/help{0}.lmp", this._Page)));
		}

		private const int NUM_HELP_PAGES = 6;

		private int _Page;
	}
}
