CanvasGroup
CanvasGroup renders descendants as a group with color and transparency applied to the render result. GuiEffect (UICorner and UIGradient) under CanvasGroup will also apply to the whole group. CanvasGroup always has GuiObject.ClipsDescendants set to true and all descendants will render within CanvasGroup's viewport.
Important notes:
- Descendants of CanvasGroup will be rendered as a flattened texture only when the ancestor LayerCollector has its LayerCollector.ZIndexBehavior set to Enum.ZIndexBehavior.Sibling.
- CanvasGroup consumes extra texture memory. The quality of the texture and total memory usage is limited by the Enum.QualityLevel of the client. When exceeding the memory cap, CanvasGroup will render as a blank texture.
- We recommend using CanvasGroup with static sizes, otherwise a new texture would need to be created to accommodate new sizes.
Resumo
Propriedades
- ler parallel
Color tint that applies to all descendants.
- ler parallel
Transparency that applies to all descendants.
Determines whether a UI element sinks input.
- ler parallel
Determines the origin point of a GuiObject, relative to its absolute size.
- ler parallel
Determines whether resizing occurs based on child content.
- ler parallel
Determines the GuiObject background color.
- ler parallel
Determines the transparency of the GuiObject background and border.
- ler parallel
Determines the color of the GuiObject border.
- ler parallel
Determines in what manner the GuiObject border is laid out relative to its dimensions.
- ler parallel
Determines the pixel width of a GuiObject border.
- ler parallel
Determines if descendant GUIs outside of the bounds of a parent GUI element should render.
- somente leituranão replicadoler parallel
- ler parallel
- ler parallel
Controls the sort order of a GUI when used with a UIGridStyleLayout.
- ler parallel
Sets the GuiObject which will be selected when the Gamepad selector is moved in this direction.
- ler parallel
Sets the GuiObject which will be selected when the Gamepad selector is moved in this direction.
- ler parallel
Sets the GUI which will be selected when the Enum.Gamepad selector is moved in this direction.
- ler parallel
Sets the GuiObject which will be selected when the Gamepad selector is moved in this direction.
Determines the pixel and scalar position of the GuiObject.
Determines the number of degrees by which a UI element is rotated.
- ler parallel
Determine whether the GUI can be selected by a gamepad.
- ler parallel
Overrides the default selection adornment used for gamepads.
- ler parallel
The order of GuiObjects selected by the gamepad UI selection.
Determine the pixel and scalar size of a GUI.
- ler parallel
Selects the GuiObject.Size axes that a GUI will be based relative to the size of its parent.
- ocultonão replicadoler paralleldescontinuado
A mixed property of BackgroundTransparency and TextTransparency.
Determines whether a GuiObject.GUI and its descendants will be rendered.
Determines the order in which a GUI renders relative to other GUIs.
- somente leituranão replicado
Describes the actual screen position of a UI element, in pixels.
- somente leituranão replicado
Describes the actual screen rotation of a UI element, in degrees.
- somente leituranão replicado
Describes the actual screen size of a UI element, in pixels.
- ler parallel
When set to true, localization will be applied to this GuiBase2d and its descendants based on the GuiBase2d.RootLocalizationTable specified for this GuiBase2d.
- ler parallel
A reference to a LocalizationTable to be used to apply automated localization to this GuiBase2d and its descendants.
- ler parallel
Customizes gamepad selection behavior in the down direction.
- ler parallel
Customizes gamepad selection behavior in the left direction.
- ler parallel
Customizes gamepad selection behavior in the right direction.
- ler parallel
Customizes gamepad selection behavior in the up direction.
- ler parallel
Allows customization of gamepad selection movement.
Métodos
Métodos herdados de GuiObject- TweenPosition(endPosition : UDim2,easingDirection : Enum.EasingDirection,easingStyle : Enum.EasingStyle,time : number,override : bool,callback : function):bool
Smoothly moves a GUI to a new UDim2.
- TweenSize(endSize : UDim2,easingDirection : Enum.EasingDirection,easingStyle : Enum.EasingStyle,time : number,override : bool,callback : function):bool
Smoothly resizes a GUI to a new UDim2.
- TweenSizeAndPosition(endSize : UDim2,endPosition : UDim2,easingDirection : Enum.EasingDirection,easingStyle : Enum.EasingStyle,time : number,override : bool,callback : function):bool
Smoothly moves a GUI to a new size and position.
Eventos
Eventos herdados de GuiObjectFired when a user begins interacting via a Human-Computer Interface device (Mouse button down, touch begin, keyboard button down, etc).
Fired when a user changes how they're interacting via a Human-Computer Interface device (Mouse button down, touch begin, keyboard button down, etc).
Fired when a user stops interacting via a Human-Computer Interface device (Mouse button down, touch begin, keyboard button down, etc).
Fires when a user moves their mouse into a GUI element.
Fires when a user moves their mouse out of a GUI element.
Fires whenever a user moves their mouse while it is inside a GUI element.
Fires when a user scrolls their mouse wheel back when the mouse is over a GUI element.
Fires when a user scrolls their mouse wheel forward when the mouse is over a GUI element.
Fired when the GuiObject is being focused on with the Gamepad selector.
Fired when the Gamepad selector stops focusing on the GuiObject.
Fires when the player starts, continues and stops long-pressing the UI element.
- TouchPan(touchPositions : Array,totalTranslation : Vector2,velocity : Vector2,state : Enum.UserInputState):RBXScriptSignal
Fires when the player moves their finger on the UI element.
- TouchPinch(touchPositions : Array,scale : number,velocity : number,state : Enum.UserInputState):RBXScriptSignal
Fires when the player performs a pinch or pull gesture using two fingers on the UI element.
- TouchRotate(touchPositions : Array,rotation : number,velocity : number,state : Enum.UserInputState):RBXScriptSignal
Fires when the player performs a rotation gesture using two fingers on the UI element.
Fires when the player performs a swipe gesture on the UI element.
Fires when the player performs a tap gesture on the UI element.
- SelectionChanged(amISelected : bool,previousSelection : GuiObject,newSelection : GuiObject):RBXScriptSignal
Fires when the gamepad selection moves to, leaves, or changes within the connected GuiBase2d or any descendent GuiObjects.