static public DMElementInfo CreateButton(string inLabel, DMBUttonCallback inCallback, DMPredicate inPredicate = null, int inIndent = 0) { return(new DMElementInfo() { Type = DMElementType.Button, Label = inLabel, Button = new DMButtonInfo() { Callback = inCallback, }, Indent = inIndent, Predicate = inPredicate }); }
/// <summary> /// Adds a button element to the menu. /// </summary> public DMInfo AddButton(string inLabel, DMBUttonCallback inCallback, DMPredicate inPredicate = null, int inIndent = 0) { Elements.PushBack(DMElementInfo.CreateButton(inLabel, inCallback, inPredicate, inIndent)); return(this); }