void CustomizeButtonClicked(object sender, EventArgs e) { if (DisplayItem != null) { Feat clone = (Feat)DisplayItem.Clone(); FeatEditorDialog dlg = new FeatEditorDialog(clone); dlg.OKClicked += (object se, EventArgs ea) => { clone.DBLoaderID = 0; Feat.AddCustomFeat(clone); Filter(true); }; MainUI.MainView.AddSubview(dlg.View); } }
void EditButtonClicked(object sender, EventArgs e) { if (DisplayItem != null && DisplayItem.IsCustom) { Feat clone = (Feat)DisplayItem.Clone(); FeatEditorDialog dlg = new FeatEditorDialog(clone); dlg.OKClicked += (object se, EventArgs ea) => { DisplayItem.CopyFrom(clone); Feat.UpdateCustomFeat(DisplayItem); Filter(true); }; MainUI.MainView.AddSubview(dlg.View); } }
void EditButtonClicked(object sender, EventArgs e) { if (DisplayItem != null && DisplayItem.IsCustom) { Spell clone = (Spell)DisplayItem.Clone(); /*FeatEditorDialog dlg = new SpellEditorDialog(clone); * dlg.OKClicked += (object se, EventArgs ea) => * { * DisplayItem.CopyFrom(clone); * Spell.UpdateCustomSpell(DisplayItem); * Filter(true); * }; * MainUI.MainView.AddSubview(dlg.View);*/ } }