public override void AddToGUIUpdateList() { base.AddToGUIUpdateList(); button.AddToGUIUpdateList(); if (Dropped) { listBox.AddToGUIUpdateList(); } }
private void AddListBoxToGUIUpdateList(GUIComponent parent) { //the parent is not our parent anymore :( //can happen when subscribed to a parent higher in the hierarchy (instead of the direct parent), //and somewhere between this component and the higher parent a component was removed for (int i = 1; i < parentHierarchy.Count; i++) { if (!parentHierarchy[i].IsParentOf(parentHierarchy[i - 1], recursive: false)) { parent.OnAddedToGUIUpdateList -= AddListBoxToGUIUpdateList; return; } } if (Dropped) { listBox.AddToGUIUpdateList(false, UpdateOrder); } }
public override void AddToGUIUpdateList() { GuiFrame.AddToGUIUpdateList(); contextMenu?.AddToGUIUpdateList(); }