Example #1
0
 public override void AddToGUIUpdateList()
 {
     base.AddToGUIUpdateList();
     button.AddToGUIUpdateList();
     if (Dropped)
     {
         listBox.AddToGUIUpdateList();
     }
 }
Example #2
0
        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);
            }
        }
Example #3
0
 public override void AddToGUIUpdateList()
 {
     GuiFrame.AddToGUIUpdateList();
     contextMenu?.AddToGUIUpdateList();
 }