public ListBoxIcon AddIcon(float top, float bottom, float left, float right, string name, int index) { ListBoxIcon lbi = new ListBoxIcon(top, bottom, left, right, name); icons.Insert(index, lbi); return(lbi); }
public ListBoxIcon AddIcon(Texture2D texture, string name) { ListBoxIcon newIcon = new ListBoxIcon(texture, name); icons.Add(newIcon); return(newIcon); }
public void FixCollapseIcon() { if (icons.Count == 0 && mItems.Count != 0) { ListBoxIcon lbi = AddIcon(146 / 256.0f, 162 / 256.0f, 140 / 256.0f, 156 / 256.0f, "$FRB_MINUS_BOX", 0); lbi.IconClick += new ListBoxFunction(((ListBoxBase)parentBox).ClickOutliningButton); // icons.Insert(0, lbi); mExpanded = true; } else if (icons.Count != 0 && (icons[0].Name == "$FRB_PLUS_BOX" || icons[0].Name == "$FRB_MINUS_BOX") && mItems.Count == 0) { this.icons.RemoveAt(0); } }
internal void ClickOutliningButton(CollapseItem collapseItem, ListBoxBase collapseListBox, ListBoxIcon listBoxIcon) { if (listBoxIcon.Name == "$FRB_PLUS_BOX") { collapseItem.Expand(); } else if (listBoxIcon.Name == "$FRB_MINUS_BOX") { collapseItem.Collapse(); } collapseListBox.AdjustScrollSize(); }
public ListBoxIcon AddIcon(float top, float bottom, float left, float right, string name, int index) { ListBoxIcon lbi = new ListBoxIcon(top, bottom, left, right, name); icons.Insert(index, lbi); return lbi; }
public ListBoxIcon AddIcon(Texture2D texture, string name) { ListBoxIcon newIcon = new ListBoxIcon(texture, name); icons.Add(newIcon); return newIcon; }