UiGridLayouts

Description

UiGridLayouts places elements of the same hierarchy in a grid.
Add a UiGridLayouts to the UI Panel, and the other UI objects of the same hierarchy will be distributed horizontally.
There can only be one UiGridLayouts at the same hierarchy.
If you want to individually resize the control in the layout, you can add a UiLayoutsElement as a child.

Properties

        string    Name
    The custom name of this object.

        string    ClassName
    The object-type name.

        RWObject    Parent
    The parent of this object.

        int    Left
    Spacing from the left side of its parent.

        int    Right
    Spacing from the right side of its parent.

        int    Top
    Spacing from the upper side of its parent.

        int    Bottom
    Spacing from the lower side of its parent.

        Vector2    Spacing
    Spacing distance between child controls.

        Vector2    CellSize
    The width and height of the child control.

        Enum.GridLayoutGroupCorner    StartCorner
    The sequence in which child objects are arranged.

        Enum.GridLayoutGroupAxis    StartAxis
    The direction in which child objects are arranged.

        Enum.TextAnchor    ChildAlignment
    The position where the written text is placed (for enumeration, it needs to differentiate from left, center, right and top, center, bottom).

        Enum.GridLayoutGroupConstraint    Constraint
    Restrict the number of layout elements in rows or columns.

        int    ConstraintCount
    Restrict the number of rows or columns.

Functions

    RWObject.Create(classname)
    A special function, creating an instance of the specified class.

    DelAllChild()
    Deletes all child objects.

    Clone()
    Clones an object to create a copy.

    Destroy()
    Delete objects.

    GetAncestorByName(Name)
    Returns the object's first parent node with the same name.

    GetAncestorByClassName(className)
    Returns the object's first parent node of the same class.

    GetChildByName(Name,recursive)
    Returns the object's first child object with the same name. If the second parameter is true, it will search through descendants of all hierarchies.

    GetChildByClassName(className,recursive)
    Returns the object's first child object of the same type. If the second parameter is true, it will search through descendants of all hierarchies.

    GetAllChild()
    Seeks all its child objects and returns as a list.

    GetAllDescendant()
    Recursively seeks all its descendants and returns as a list.

    IsClass(ClassName)
    Judges whether it is the class the same as the given object class or not.

    IsAncestor(TarObj)
    Judges whether itself is the ancestor of the target object or not.

    IsDescendant(TarObj)
    Judges whether itself is the descendant of the target object or not.

    WaitForChild(childName,timeout)
    Seeks its own child object.

    Child(childName)
    Seeks its own child object by a given name.

    Equals(TarObj)
    Judges whether the target object is the same as itself or not.

Events

    ChildAdded(childobject)
    Triggered when a direct child object is added.

    ChildRemoved(childobject)
    Deletes all child objects.

    DescendantAdded(descendantobject)
    Triggered when a descendant is added.

    DescendantRemoved(descendantobject)
    Triggered when a descendant is removed.

    AncestryChanged(AncestryChanged)
    Triggered when the ancestry is changed.