コード例 #1
0
        public void CreateItemList(int selectedGroup)
        {
            if (selectedGroup == 501)               // 501 : Last 10
            {
                CreateMakeLastList();
                return;
            }

            BuildGroupCol buildGroupCol = m_BuildSystem.BuildGroups;
            BuildGroup    buildGroup    = buildGroupCol.GetAt(selectedGroup);
            BuildItemCol  buildItemCol  = buildGroup.BuildItems;

            for (int i = 0; i < buildItemCol.Count; ++i)
            {
                int index = i % 10;

                BuildItem buildItem = buildItemCol.GetAt(i);

                if (index == 0)
                {
                    if (i > 0)
                    {
                        AddButton(370, 260, 4005, 4007, 0, GumpButtonType.Page, (i / 10) + 1);
                        AddHtmlLocalized(405, 263, 100, 18, 1044045, LabelColor, false, false);                           // NEXT PAGE
                    }

                    AddPage((i / 10) + 1);

                    if (i > 0)
                    {
                        AddButton(220, 260, 4014, 4015, 0, GumpButtonType.Page, i / 10);
                        AddHtmlLocalized(255, 263, 100, 18, 1044044, LabelColor, false, false);                           // PREV PAGE
                    }
                }

                AddButton(220, 60 + (index * 20), 4005, 4007, GetButtonID(1, i), GumpButtonType.Reply, 0);

                if (buildItem.NameNumber > 0)
                {
                    AddHtmlLocalized(255, 63 + (index * 20), 220, 18, buildItem.NameNumber, LabelColor, false, false);
                }
                else
                {
                    AddLabel(255, 60 + (index * 20), LabelHue, buildItem.NameString);
                }

                AddButton(480, 60 + (index * 20), 4011, 4012, GetButtonID(2, i), GumpButtonType.Reply, 0);
            }
        }
コード例 #2
0
        public void SetManaReq(int index, int mana)
        {
            BuildItem buildItem = m_BuildItems.GetAt(index);

            buildItem.Mana = mana;
        }