public static void Show(PacketAPI api)
		{
			if (Instance != null)
				Instance.Close(null, XNADialogResult.NO_BUTTON_PRESSED);

			Instance = new QuestProgressDialog(api);

			if (!api.RequestQuestHistory(QuestPage.Progress))
			{
				Instance.Close(null, XNADialogResult.NO_BUTTON_PRESSED);
				EOGame.Instance.DoShowLostConnectionDialogAndReturnToMainMenu();
			}
		}
        public static void Show(PacketAPI api)
        {
            if (Instance != null)
            {
                Instance.Close(null, XNADialogResult.NO_BUTTON_PRESSED);
            }

            Instance = new QuestProgressDialog(api);

            if (!api.RequestQuestHistory(QuestPage.Progress))
            {
                Instance.Close(null, XNADialogResult.NO_BUTTON_PRESSED);
                EOGame.Instance.DoShowLostConnectionDialogAndReturnToMainMenu();
            }
        }
        private QuestProgressDialog(PacketAPI api)
            : base(api)
        {
            DialogClosing += (o, e) =>
            {
                Instance = null;
            };

            _setupBGTexture();

            m_history = new XNAButton(smallButtonSheet, new Vector2(288, 252), _getSmallButtonOut(SmallButton.History), _getSmallButtonOver(SmallButton.History));
            m_history.SetParent(this);
            m_history.OnClick += _historyClick;

            m_progress = new XNAButton(smallButtonSheet, new Vector2(288, 252), _getSmallButtonOut(SmallButton.Progress), _getSmallButtonOver(SmallButton.Progress))
            {
                Visible = false
            };
            m_progress.SetParent(this);
            m_progress.OnClick += _progressClick;

            var ok = new XNAButton(smallButtonSheet, new Vector2(380, 252), _getSmallButtonOut(SmallButton.Ok), _getSmallButtonOver(SmallButton.Ok));

            ok.SetParent(this);
            ok.OnClick += (o, e) => Close(ok, XNADialogResult.OK);

            dlgButtons.AddRange(new[] { m_history, ok });

            m_titleText = new XNALabel(new Rectangle(18, 14, 452, 19), Constants.FontSize08pt5)
            {
                AutoSize  = false,
                TextAlign = LabelAlignment.MiddleLeft,
                ForeColor = ColorConstants.LightGrayText,
                Text      = " "
            };
            m_titleText.SetParent(this);

            m_scrollBar.DrawLocation     = new Vector2(449, 44);
            SmallItemStyleMaxItemDisplay = 10;
            ListItemType = ListDialogItem.ListItemStyle.Small;
        }
		private QuestProgressDialog(PacketAPI api)
			: base(api)
		{
			DialogClosing += (o, e) =>
			{
				Instance = null;
			};

			_setupBGTexture();

			m_history = new XNAButton(smallButtonSheet, new Vector2(288, 252), _getSmallButtonOut(SmallButton.History), _getSmallButtonOver(SmallButton.History));
			m_history.SetParent(this);
			m_history.OnClick += _historyClick;

			m_progress = new XNAButton(smallButtonSheet, new Vector2(288, 252), _getSmallButtonOut(SmallButton.Progress), _getSmallButtonOver(SmallButton.Progress))
			{
				Visible = false
			};
			m_progress.SetParent(this);
			m_progress.OnClick += _progressClick;

			var ok = new XNAButton(smallButtonSheet, new Vector2(380, 252), _getSmallButtonOut(SmallButton.Ok), _getSmallButtonOver(SmallButton.Ok));
			ok.SetParent(this);
			ok.OnClick += (o, e) => Close(ok, XNADialogResult.OK);

			dlgButtons.AddRange(new[] { m_history, ok });

			m_titleText = new XNALabel(new Rectangle(18, 14, 452, 19), Constants.FontSize08pt5)
			{
				AutoSize = false,
				TextAlign = LabelAlignment.MiddleLeft,
				ForeColor = Constants.LightGrayText,
				Text = " "
			};
			m_titleText.SetParent(this);

			m_scrollBar.DrawLocation = new Vector2(449, 44);
			SmallItemStyleMaxItemDisplay = 10;
			ListItemType = ListDialogItem.ListItemStyle.Small;
		}