BillBoardGui

Description

BillBoardGui can display the stored UI objects in the game scene in a 3D form. To display UI objects under the display container control to players, BillBoardGui must be a child of an entity object, such as Part.

Properties

        string    Name
    The custom name of this object.

        string    ClassName
    The object-type name.

        RWObject    Parent
    The parent of this object.

        bool    KeepSacle
    Check to keep the control's size. Otherwise, the size will get bigger or smaller according to camera distance.

        bool    AlwaysOnTop
    Top layer or not.

        bool    ClipChild
    Check to show the exceeded part of child object when it exceeds the control border. Otherwise, the exceeded part will not be shown.

        Vector2    Size
    Set the size of this control.

        Vector3    Offset
    The offset distance relative to global coordinates.

        Vector3    WorldSpaceOffset
    The offset distance relative to screen coordinates.

        float    MaxDistance
    The control will not be seen when the player is over this distance.

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 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.

    GuiMouseLeftPress()
    This event is triggered when the GUI object is left-clicked on.

    GuiMouseLeftDown(mousePosition.x, mousePosition.y)
    This event is triggered when the left mouse button is pressed on the GUI object.

    GuiMouseLeftUp(mousePosition.x, mousePosition.y)
    This event is triggered when the left mouse button is released from the GUI object.

    GuiMouseRightPress()
    This event is triggered when the GUI object is right-clicked on.

    GuiMouseRightDown(mousePosition.x, mousePosition.y)
    This event is triggered when the right mouse button is pressed on the GUI object.

    GuiMouseRightUp(mousePosition.x, mousePosition.y)
    This event is triggered when the right mouse button is released from the GUI object.

    GuiMouseScrollDown(mousePosition.x, mousePosition.y)
    This event is triggered when the middle mouse button is pressed on the GUI object.

    GuiMouseScrollUp(mousePosition.x, mousePosition.y)
    This event is triggered when the middle mouse button is released from the GUI object.

    GuiMouseScrollPress()
    This event is triggered when the GUI object is middle-clicked on.

    GuiInputBegan(inputobject,bool)
    This event is triggered when the user input (by mouse, touch, keyboard, etc.) starts.

    GuiInputChanged(inputobject,bool)
    This event is triggered when the user input changes.

    GuiInputEnded(inputobject,bool)
    This event is triggered when the user input ends.

    GuiMouseWheelBackward(mousePosition.x, mousePosition.y)
    This event is triggered when the mouse wheel scrolls backwards.

    GuiMouseWheelForward(mousePosition.x, mousePosition.y)
    This event is triggered when the mouse wheel scrolls forwards.

    GuiTouchLongPress(Touch.position, touchState)
    This event is triggered when the GUI object is long pressed at the same position.

    GuiTouchPan(Touch.position, pandistance, panspeed, touchState)
    This event is triggered when a finger moves on the GUI object.

    GuiTouchPinch({ newtouch1.position, newtouch2.position }, scale , pinchspeed, touchState)
    This event is triggered when two fingers are pinched or pulled apart on the GUI object.

    GuiTouchRotate({ newtouch1.position, newtouch2.position }, signedAngle, signedAnglespeed , touchState)
    This event is triggered when two fingers are rotated on the GUI object.

    GuiTouchSwipe(touchMoveDir, touchCount)
    This event is triggered when one or more fingers swipe on the GUI object.

    GuiTouchTap(Touch.position)
    This event is triggered when the user touches lightly on the touch device.