BasePlayerGui
The BasePlayerGui is an abstract class which the GUI drawing storage classes inherit from.
Memory category | Instances |
---|
Member index 2
Description
The BasePlayerGui is an abstract class that all GUI drawing storage classes inherit from.
History 5
- 462 Change ThreadSafety of GetGuiObjectsInCircle from to Unsafe
- 462 Change ThreadSafety of GetGuiObjectsAtPosition from to Unsafe
- 451 Add GetGuiObjectsInCircle
- 366 Add GetGuiObjectsAtPosition
- 47 Add BasePlayerGui
Members 2
GetGuiObjectsAtPosition
Parameters (2) | ||
---|---|---|
x | int | |
y | int | |
Returns (1) | ||
Objects |
Takes a screen position and returns a list of all the GuiObject instances that are occupying that screen position, sorted in the order they appear on-screen from top to bottom as the first and last index, respectively.
The main use case is to get GUI objects under the player's mouse or touch inputs to do things like allow selection or highlighting. These effects can already be achieved using GuiObject.MouseEnter and GuiObject.MouseLeave but this requires the developer to track these events for their UI objects all the time even if they only need this functionality in specific circumstances.
Since the child classes of BasePlayerGui inherit this function, it can be fired by class objects such as the PlayerGui and StarterGui folders.
Thread safety | Unsafe |
---|
History 2
- 462 Change ThreadSafety of GetGuiObjectsAtPosition from to Unsafe
- 366 Add GetGuiObjectsAtPosition
GetGuiObjectsInCircle
Parameters (2) | ||
---|---|---|
position | Vector2 | |
radius | float | |
Returns (1) | ||
Objects |
Security | RobloxScriptSecurity |
---|---|
Thread safety | Unsafe |
History 2
- 462 Change ThreadSafety of GetGuiObjectsInCircle from to Unsafe
- 451 Add GetGuiObjectsInCircle