GuiBase2d
GuiBase2d is an abstract class inherited by 2D GUI Objects.
Memory category | Instances |
---|
Member index 17
Description
GuiBase2d is an abstract class inherited by 2D GUI Objects.
History 89
- 553 Change Default of from to
- 553 Change Default of SelectionGroup from to
- 553 Change Default of SelectionBehaviorUp from to
- 553 Change Default of SelectionBehaviorRight from to
- 553 Change Default of SelectionBehaviorLeft from to
- 553 Change Default of SelectionBehaviorDown from to
- 553 Change Default of RootLocalizationTable from to
- 553 Add
- 553 Change Default of from to
- 553 Change PreferredDescriptor of from to AutoLocalize
- 553 Change Default of from to
- 553 Change Default of from to
- 553 Change Default of from to
- 553 Change Default of AutoLocalize from to
- 553 Change Default of AbsoluteSize from to
- 553 Change Default of AbsoluteRotation from to
- 553 Change Default of AbsolutePosition from to
- 527 Change Tags of SelectionGroup from [NotBrowsable] to []
- 527 Change Tags of SelectionBehaviorUp from [NotBrowsable] to []
- 527 Change Tags of SelectionBehaviorRight from [NotBrowsable] to []
- 527 Change Tags of SelectionBehaviorLeft from [NotBrowsable] to []
- 527 Change Tags of SelectionBehaviorDown from [NotBrowsable] to []
- 525 Add SelectionChanged
- 523 Change WriteSecurity of SelectionGroup from RobloxScriptSecurity to None
- 523 Change Tags of SelectionGroup from [Hidden, NotReplicated, NotBrowsable] to [NotBrowsable]
- 523 Change ReadSecurity of SelectionGroup from RobloxScriptSecurity to None
- 523 Change CanSave of SelectionGroup from false to true
- 523 Change CanLoad of SelectionGroup from false to true
- 523 Change WriteSecurity of SelectionBehaviorUp from RobloxScriptSecurity to None
- 523 Change Tags of SelectionBehaviorUp from [Hidden, NotReplicated, NotBrowsable] to [NotBrowsable]
- 523 Change ReadSecurity of SelectionBehaviorUp from RobloxScriptSecurity to None
- 523 Change CanSave of SelectionBehaviorUp from false to true
- 523 Change CanLoad of SelectionBehaviorUp from false to true
- 523 Change WriteSecurity of SelectionBehaviorRight from RobloxScriptSecurity to None
- 523 Change Tags of SelectionBehaviorRight from [Hidden, NotReplicated, NotBrowsable] to [NotBrowsable]
- 523 Change ReadSecurity of SelectionBehaviorRight from RobloxScriptSecurity to None
- 523 Change CanSave of SelectionBehaviorRight from false to true
- 523 Change CanLoad of SelectionBehaviorRight from false to true
- 523 Change WriteSecurity of SelectionBehaviorLeft from RobloxScriptSecurity to None
- 523 Change Tags of SelectionBehaviorLeft from [Hidden, NotReplicated, NotBrowsable] to [NotBrowsable]
- 523 Change ReadSecurity of SelectionBehaviorLeft from RobloxScriptSecurity to None
- 523 Change CanSave of SelectionBehaviorLeft from false to true
- 523 Change CanLoad of SelectionBehaviorLeft from false to true
- 523 Change WriteSecurity of SelectionBehaviorDown from RobloxScriptSecurity to None
- 523 Change Tags of SelectionBehaviorDown from [Hidden, NotReplicated, NotBrowsable] to [NotBrowsable]
- 523 Change ReadSecurity of SelectionBehaviorDown from RobloxScriptSecurity to None
- 523 Change CanSave of SelectionBehaviorDown from false to true
- 523 Change CanLoad of SelectionBehaviorDown from false to true
- 522 Add SelectionGroup
- 522 Add SelectionBehaviorUp
- 522 Add SelectionBehaviorRight
- 522 Add SelectionBehaviorLeft
- 522 Add SelectionBehaviorDown
- 486 Change ThreadSafety of from ReadOnly to ReadSafe
- 486 Change ThreadSafety of RootLocalizationTable from ReadOnly to ReadSafe
- 486 Change ThreadSafety of from ReadOnly to ReadSafe
- 486 Change ThreadSafety of from ReadOnly to ReadSafe
- 486 Change ThreadSafety of from ReadOnly to ReadSafe
- 486 Change ThreadSafety of from ReadOnly to ReadSafe
- 486 Change ThreadSafety of AutoLocalize from ReadOnly to ReadSafe
- 462 Change ThreadSafety of from to ReadOnly
- 462 Change ThreadSafety of RootLocalizationTable from to ReadOnly
- 462 Change ThreadSafety of from to ReadOnly
- 462 Change ThreadSafety of from to ReadOnly
- 462 Change ThreadSafety of from to ReadOnly
- 462 Change ThreadSafety of from to ReadOnly
- 462 Change ThreadSafety of AutoLocalize from to ReadOnly
- 462 Change ThreadSafety of AbsoluteSize from to Unsafe
- 462 Change ThreadSafety of AbsoluteRotation from to Unsafe
- 462 Change ThreadSafety of AbsolutePosition from to Unsafe
- 452 Add
- 452 Add
- 452 Add
- 452 Add
- 397 Change CanSave of AbsoluteRotation from true to false
- 335 Remove
- 333 Add
- 330 Change ValueType of RootLocalizationTable from Instance to LocalizationTable
- 329 Change ValueType of RootLocalizationTable from Object to Instance
- 328 Change Tags of RootLocalizationTable from [Hidden] to []
- 328 Change Tags of AutoLocalize from [Hidden] to []
- 326 Add RootLocalizationTable
- 326 Change Tags of from [Hidden, NotReplicated] to [Hidden, NotReplicated, Deprecated]
- 326 Add AutoLocalize
- 309 Add
- 293 Add AbsoluteRotation
- 85 Add AbsoluteSize
- 85 Add AbsolutePosition
- 85 Add GuiBase2d
Members 17
AbsolutePosition
Type | Default | |
---|---|---|
Vector2 |
AbsolutePosition is a read-only property that provides the screen position of a UI element in pixels. This represents the actual pixel position at which an element renders as a result of its ancestors' sizes and positions. The GuiObject.AnchorPoint also influences the AbsolutePosition. This property, GuiBase2d.AbsoluteSize and GuiBase2d.AbsoluteRotation are a group of properties that all describe the final rendered orientation of a UI element.
For example, on a 1920 by 1080 screen, a Frame with position {0.5, 0}, {0.5, 0} would have an AbsolutePosition of (960, 540). If you were to place another Frame with position {0, 50}, {0, 50} inside that one, its AbsolutePosition would be (1010, 590). This example assumes each Frame has the default GuiObject.AnchorPoint of (0, 0), the top left corner.
Thread safety | Unsafe |
---|---|
Category | Data |
Loaded/Saved | false |
History 3
- 553 Change Default of AbsolutePosition from to
- 462 Change ThreadSafety of AbsolutePosition from to Unsafe
- 85 Add AbsolutePosition
AbsoluteRotation
Type | Default | |
---|---|---|
float |
AbsoluteRotation is a read-only property that describes the actual screen rotation of a UI element, in degrees. This property, GuiBase2d.AbsoluteSize and GuiBase2d.AbsolutePosition are a group of properties that all describe the final rendered orientation of a UI element. It composes (sums) each of the UI element's ancestors' GuiObject.Rotation into one value. It does not perform bounds checking, so its value may not be in the range 0 ≤ x < 360 degrees.
For example, if FrameA has a rotation of 40 degrees, and FrameB within it has a GuiObject.Rotation of 50 degrees, then FrameB's AbsoluteRotation would be 90 degrees.
Thread safety | Unsafe |
---|---|
Category | Data |
Loaded/Saved | false |
History 4
- 553 Change Default of AbsoluteRotation from to
- 462 Change ThreadSafety of AbsoluteRotation from to Unsafe
- 397 Change CanSave of AbsoluteRotation from true to false
- 293 Add AbsoluteRotation
AbsoluteSize
Type | Default | |
---|---|---|
Vector2 |
AbsoluteSize is a read-only property that provides the screen size of a UI element in pixels. This represents the actual pixel size at which an element renders as a result of its ancestors' sizes. This property, GuiBase2d.AbsolutePosition and GuiBase2d.AbsoluteRotation are a group of properties that all describe the final rendered orientation of a UI element.
For example, on a 1920 by 1080 screen, if FrameA exists within FrameB, and they both have a Size of {.5, 0}, {.5, 0}, then the AbsoluteSize of FrameA (the inner frame) would be (480, 270) as the GuiObject.Size property determines the size of a child UI element relative to its parent. Both of the frames are set to 50% of the parent size. Since 50% of 50% is 25%, and 25% of our screen size, 1920 by 1080, is (480, 270), this would be the resultant AbsoluteSize of the inner frame.
Thread safety | Unsafe |
---|---|
Category | Data |
Loaded/Saved | false |
History 3
- 553 Change Default of AbsoluteSize from to
- 462 Change ThreadSafety of AbsoluteSize from to Unsafe
- 85 Add AbsoluteSize
AutoLocalize
Type | Default | |
---|---|---|
bool |
When set to true, localization will be applied to this GuiBase2d and its descendants. The entries used for localization are the same set of entries returned by LocalizationService:GetTableEntries(). Entries with GuiBase2d.AutoLocalize enabled are automatically re-translated after the cloud table loads if necessary.
See also GuiBase2d.RootLocalizationTable.
Thread safety | ReadSafe |
---|---|
Category | Localization |
Loaded/Saved | true |
History 5
- 553 Change Default of AutoLocalize from to
- 486 Change ThreadSafety of AutoLocalize from ReadOnly to ReadSafe
- 462 Change ThreadSafety of AutoLocalize from to ReadOnly
- 328 Change Tags of AutoLocalize from [Hidden] to []
- 326 Add AutoLocalize
RootLocalizationTable
Type | Default | |
---|---|---|
LocalizationTable |
A reference to a LocalizationTable to be used to apply automated localization to this GuiBase2d and its descendants.
The GuiBase2d.AutoLocalize property must be set to true on this
object and its ancestors for automated localization to be applied. You can
set this to reference a LocalizationTable anywhere in the DataModel. It is
not required to be a child of LocalizationService. When
RootLocalizationTable
is set on a GUI object, then that object and all
of its children will try to use that specific LocalizationTable
and its ancestors for automatic text replacement before using the tables
under LocalizationService in an undefined order and the cloud
table.
If there is no translation available in the referenced table it will look for a translation in the parent of that table, if it is also a LocalizationTable, and so on.
See also LocalizationService:GetTableEntries() which explains how the GuiBase2d.RootLocalizationTable is used for automated localization.
Thread safety | ReadSafe |
---|---|
Category | Localization |
Loaded/Saved | true |
History 7
- 553 Change Default of RootLocalizationTable from to
- 486 Change ThreadSafety of RootLocalizationTable from ReadOnly to ReadSafe
- 462 Change ThreadSafety of RootLocalizationTable from to ReadOnly
- 330 Change ValueType of RootLocalizationTable from Instance to LocalizationTable
- 329 Change ValueType of RootLocalizationTable from Object to Instance
- 328 Change Tags of RootLocalizationTable from [Hidden] to []
- 326 Add RootLocalizationTable
SelectionBehaviorDown
Type | Default | |
---|---|---|
SelectionBehavior |
Customizes gamepad selection behavior in the down direction.
Thread safety | ReadSafe |
---|---|
Category | Selection |
Loaded/Saved | true |
History 8
- 553 Change Default of SelectionBehaviorDown from to
- 527 Change Tags of SelectionBehaviorDown from [NotBrowsable] to []
- 523 Change WriteSecurity of SelectionBehaviorDown from RobloxScriptSecurity to None
- 523 Change Tags of SelectionBehaviorDown from [Hidden, NotReplicated, NotBrowsable] to [NotBrowsable]
- 523 Change ReadSecurity of SelectionBehaviorDown from RobloxScriptSecurity to None
- 523 Change CanSave of SelectionBehaviorDown from false to true
- 523 Change CanLoad of SelectionBehaviorDown from false to true
- 522 Add SelectionBehaviorDown
SelectionBehaviorLeft
Type | Default | |
---|---|---|
SelectionBehavior |
Customizes gamepad selection behavior in the left direction.
Thread safety | ReadSafe |
---|---|
Category | Selection |
Loaded/Saved | true |
History 8
- 553 Change Default of SelectionBehaviorLeft from to
- 527 Change Tags of SelectionBehaviorLeft from [NotBrowsable] to []
- 523 Change WriteSecurity of SelectionBehaviorLeft from RobloxScriptSecurity to None
- 523 Change Tags of SelectionBehaviorLeft from [Hidden, NotReplicated, NotBrowsable] to [NotBrowsable]
- 523 Change ReadSecurity of SelectionBehaviorLeft from RobloxScriptSecurity to None
- 523 Change CanSave of SelectionBehaviorLeft from false to true
- 523 Change CanLoad of SelectionBehaviorLeft from false to true
- 522 Add SelectionBehaviorLeft
SelectionBehaviorRight
Type | Default | |
---|---|---|
SelectionBehavior |
Customizes gamepad selection behavior in the right direction.
Thread safety | ReadSafe |
---|---|
Category | Selection |
Loaded/Saved | true |
History 8
- 553 Change Default of SelectionBehaviorRight from to
- 527 Change Tags of SelectionBehaviorRight from [NotBrowsable] to []
- 523 Change WriteSecurity of SelectionBehaviorRight from RobloxScriptSecurity to None
- 523 Change Tags of SelectionBehaviorRight from [Hidden, NotReplicated, NotBrowsable] to [NotBrowsable]
- 523 Change ReadSecurity of SelectionBehaviorRight from RobloxScriptSecurity to None
- 523 Change CanSave of SelectionBehaviorRight from false to true
- 523 Change CanLoad of SelectionBehaviorRight from false to true
- 522 Add SelectionBehaviorRight
SelectionBehaviorUp
Type | Default | |
---|---|---|
SelectionBehavior |
Customizes gamepad selection behavior in the up direction.
Thread safety | ReadSafe |
---|---|
Category | Selection |
Loaded/Saved | true |
History 8
- 553 Change Default of SelectionBehaviorUp from to
- 527 Change Tags of SelectionBehaviorUp from [NotBrowsable] to []
- 523 Change WriteSecurity of SelectionBehaviorUp from RobloxScriptSecurity to None
- 523 Change Tags of SelectionBehaviorUp from [Hidden, NotReplicated, NotBrowsable] to [NotBrowsable]
- 523 Change ReadSecurity of SelectionBehaviorUp from RobloxScriptSecurity to None
- 523 Change CanSave of SelectionBehaviorUp from false to true
- 523 Change CanLoad of SelectionBehaviorUp from false to true
- 522 Add SelectionBehaviorUp
SelectionChanged
Parameters (3) | |
---|---|
amISelected | bool |
previousSelection | GuiObject |
newSelection | GuiObject |
This event fires when the selection changes within any descendants of the connected GuiBase2d. When the selection highlight moves to a GuiObject, the event bubbles from that GuiObject to all of its ancestors, informing them that the selection has changed/entered/exited to a GuiObject in their descendant tree.
Thread safety | Unsafe |
---|
History 1
- 525 Add SelectionChanged
SelectionGroup
Type | Default | |
---|---|---|
bool |
Toggling SelectionGroup on for a GUI allows customization of how gamepad selection can move between buttons, which are descendants of the SelectionGroup, leaves the group, and selects other buttons. Setting SelectionGroup to true exposes the SelectionBehaviorUp/Down/Left/ Right properties, which can be set to SelectionBehavior.Escape or SelectionBehavior.Stop. Escape is the default behavior. When set to Escape, the gamepad selection tries to first find a selection within the SelectionGroup and only moves outside if it does not find a suitable button. When set to Stop, gamepad selection only looks within the SelectionGroup and does not move outside of the group from the SelectionBehavior direction.
Thread safety | ReadSafe |
---|---|
Category | Selection |
Loaded/Saved | true |
History 8
- 553 Change Default of SelectionGroup from to
- 527 Change Tags of SelectionGroup from [NotBrowsable] to []
- 523 Change WriteSecurity of SelectionGroup from RobloxScriptSecurity to None
- 523 Change Tags of SelectionGroup from [Hidden, NotReplicated, NotBrowsable] to [NotBrowsable]
- 523 Change ReadSecurity of SelectionGroup from RobloxScriptSecurity to None
- 523 Change CanSave of SelectionGroup from false to true
- 523 Change CanLoad of SelectionGroup from false to true
- 522 Add SelectionGroup