FairyGUI.GGraph.AddBeforeMe C# (CSharp) Method

AddBeforeMe() public method

Add another object before this object. 在显示列表中,将另一个对象插入到这个对象的前面。
public AddBeforeMe ( GObject target ) : void
target GObject Target object.
return void
        public void AddBeforeMe(GObject target)
        {
            if (parent == null)
                throw new Exception("parent not set");

            int index = parent.GetChildIndex(this);
            parent.AddChildAt(target, index);
        }

Usage Example

 static public int AddBeforeMe(IntPtr l)
 {
     try {
         FairyGUI.GGraph  self = (FairyGUI.GGraph)checkSelf(l);
         FairyGUI.GObject a1;
         checkType(l, 2, out a1);
         self.AddBeforeMe(a1);
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
All Usage Examples Of FairyGUI.GGraph::AddBeforeMe