public TreasureMapLibraryGump(PlayerMobile player, TreasureMapLibrary library, int pageNumber) : base(10, 10)
        {
            if (player == null)
            {
                return;
            }
            if (library == null)
            {
                return;
            }
            if (library.Deleted)
            {
                return;
            }

            m_Player     = player;
            m_Library    = library;
            m_PageNumber = pageNumber;

            Closable   = true;
            Disposable = true;
            Dragable   = true;
            Resizable  = false;

            #region Images

            AddImage(205, 193, 11015, 2503);
            AddImage(204, 1, 11015, 2503);
            AddImage(3, 192, 11015, 2503);
            AddImage(3, 1, 11015, 2503);

            AddImage(302, 75, 2081, 2499);
            AddImage(300, 270, 2081, 2499);
            AddImage(301, 141, 2081, 2499);
            AddImage(301, 5, 2081, 2499);
            AddImage(301, 206, 2081, 2499);
            AddImage(299, 338, 2081, 2499);
            AddImage(44, 6, 2081, 2499);
            AddImage(44, 75, 2081, 2499);
            AddImage(43, 141, 2081, 2499);
            AddImage(43, 206, 2081, 2499);
            AddImage(41, 335, 2081);
            AddImage(43, 274, 2081, 2499);
            AddImage(41, 338, 2081, 2499);
            AddImage(49, 80, 3001, 2615);
            AddImage(56, 80, 3001, 2615);
            AddImage(306, 80, 3001, 2615);
            AddImage(315, 80, 3001, 2615);
            AddImageTiled(301, 2, 6, 405, 2701);

            AddItem(153, 25, 5356, 0);

            #endregion

            AddLabel(88, 53, WhiteTextHue, "Add All in Backpack into Library");
            AddButton(65, 56, 2118, 2118, 1, GumpButtonType.Reply, 0);

            AddLabel(354, 5, 2615, "Locked Down Access Level");

            string accessName = "Owner";

            switch (m_Library.LockedDownAccessLevel)
            {
            case TreasureMapLibrary.LockedDownAccessLevelType.Owner: accessName = "Owner"; break;

            case TreasureMapLibrary.LockedDownAccessLevelType.CoOwner: accessName = "Co-Owner"; break;

            case TreasureMapLibrary.LockedDownAccessLevelType.Friend: accessName = "Friend"; break;

            case TreasureMapLibrary.LockedDownAccessLevelType.Anyone: accessName = "Anyone"; break;
            }

            AddLabel(Utility.CenteredTextOffset(435, accessName), 25, 2562, accessName);

            AddButton(366, 28, 2223, 2223, 2, GumpButtonType.Reply, 0);
            AddButton(488, 29, 2224, 2224, 3, GumpButtonType.Reply, 0);

            AddLabel(347, 53, WhiteTextHue, "Remove All Possible on Selection");

            if (m_Library.RemoveAllOnSelection)
            {
                AddButton(313, 48, 2154, 2151, 4, GumpButtonType.Reply, 0);
            }
            else
            {
                AddButton(313, 48, 2151, 2154, 4, GumpButtonType.Reply, 0);
            }

            //-----

            AddLabel(105, 5, 2415, "Treasure Map Library");

            int leftStartY  = 90;
            int rightStartY = 90;
            int itemSpacing = 30;

            //Left Side: Undecoded
            AddLabel(142, leftStartY, 2502, "Undecoded");

            leftStartY += itemSpacing;

            for (int a = TreasureMap.MinLevel; a < TreasureMap.MaxLevel + 1; a++)
            {
                TreasureMapLibraryEntry entry = m_Library.GetLibraryEntry(a, false);

                int numberTextHue = WhiteTextHue;

                if (entry.Count > 0)
                {
                    numberTextHue = 2502;
                }

                if (entry != null)
                {
                    AddLabel(60, leftStartY, 2502, TreasureMap.GetMapDisplayName(a));
                    AddButton(230, leftStartY + 3, 2117, 2118, 10 + a, GumpButtonType.Reply, 0);
                    AddLabel(250, leftStartY, numberTextHue, entry.Count.ToString());

                    leftStartY += itemSpacing;
                }
            }

            //Right Side: Decoded
            AddLabel(408, rightStartY, 2413, "Decoded");

            rightStartY += itemSpacing;

            for (int a = TreasureMap.MinLevel; a < TreasureMap.MaxLevel + 1; a++)
            {
                TreasureMapLibraryEntry entry = m_Library.GetLibraryEntry(a, true);

                int numberTextHue = WhiteTextHue;

                if (entry.Count > 0)
                {
                    numberTextHue = 2413;
                }

                if (entry != null)
                {
                    AddLabel(325, rightStartY, 2413, TreasureMap.GetMapDisplayName(a));
                    AddButton(495, rightStartY + 3, 2117, 2118, 20 + a, GumpButtonType.Reply, 0);
                    AddLabel(515, rightStartY, numberTextHue, entry.Count.ToString());

                    rightStartY += itemSpacing;
                }
            }
        }