public ValorTitleItemEdit(ValorRewardController mValorRewardController, ValorTitleItem mtitle, ValorItem mVItem, bool addingItem) : base(820, 300) { _mIsAdd = addingItem; _MValorRc = mValorRewardController; _MValorTitleItem = mtitle; _mVItem = mVItem; Closable = true; Disposable = false; Dragable = true; Resizable = false; AddBackground(0, 0, 500, 450, 2620); if (mVItem == null) { EditTitle(); } else { EditItem(); } AddButton(350, 400, 4023, 4024, 1, GumpButtonType.Reply, 0); //ok AddButton(430, 400, 4017, 4018, 0, GumpButtonType.Reply, 0); //cancel }
public ValorTitleRewardAdmin( ValorRewardController mValorRewardController, List<ValorItem> vlist, int listPageCat, int listPageItem, string scurrcat, string soldcat) : base(820, 300) { Closable = true; Disposable = false; Dragable = true; Resizable = false; _mListPageCat = listPageCat; _vList = vlist; _iListPageItem = listPageItem; _MValorRc = mValorRewardController; _scurrcat = scurrcat; _soldcat = soldcat; if (_scurrcat == null && _MValorRc.Categories != null) { _scurrcat = _MValorRc.Categories[0]; } if (_scurrcat != "Titles" && _vList != null && !_vList.Exists(x => x.Cat == _scurrcat) || _vList == null && _scurrcat != "Titles") { List<ValorItem> a = _MValorRc.GetValorItems.Where(x => x.Cat == _scurrcat).ToList(); _vList = a; } //Main container AddBackground(0, 0, 300, 425, 2620); AddLabel(40, 20, 5, @"Titles & Valor Items Administration"); AddLabel(10, 45, 52, @"Categories"); CatGen(); if (_scurrcat == "Titles") { TitleGen(); } else { ItemGen(); } PageGen(); //H and V bars AddBackground(140, 45, 2, 196, 9300); AddBackground(3, 63, 293, 2, 9300); AddBackground(3, 240, 293, 2, 9300); AddLabel(10, 247, 32, @"Add Category"); AddBackground(5, 280, 95, 25, 9350); AddLabel(7, 263, 55, @"Category Name"); AddTextEntry(7, 285, 90, 20, 2622, 0, ""); //cat name AddButton(6, 307, 4005, 4006, 21, GumpButtonType.Reply, 0); AddLabel(10, 327, 32, @"Delete Category"); AddBackground(5, 360, 95, 25, 9350); AddLabel(7, 343, 55, @"Category Name"); AddTextEntry(7, 365, 90, 20, 2622, 1, ""); //cat delete name AddButton(6, 387, 4005, 4006, 22, GumpButtonType.Reply, 0); AddLabel(150, 247, 32, @"Add Item"); AddButton(210, 246, 4005, 4006, 23, GumpButtonType.Reply, 0); AddLabel(150, 287, 32, @"Add Title"); AddButton(210, 286, 4005, 4006, 24, GumpButtonType.Reply, 0); }