Reference API Roblox

Engine API

Website

Related

Reference API Roblox

PluginGui

An abstract base class for GUIs that display GuiObjects in Roblox Studio widgets.

This class is not replicated. Its interface does not cross the network boundary.
This class is not creatable. Instances of this class cannot be created with Instance.new.
Tags: [NotCreatable, NotReplicated]

Member index 17

HistoryMember
731Title: string
573BindToClose(function: Function = nil): null
462GetRelativeMousePosition(): Vector2
725OverrideStudioAction(studioAction: StudioAction): StudioActionOverride
651InputBegan(input: InputObject, gameProcessedEvent: bool)
651InputChanged(input: InputObject, gameProcessedEvent: bool)
651InputEnded(input: InputObject, gameProcessedEvent: bool)
651MouseEnter()
651MouseLeave()
462PluginDragDropped(dragData: Dictionary)
462PluginDragEntered(dragData: Dictionary)
462PluginDragLeft(dragData: Dictionary)
462PluginDragMoved(dragData: Dictionary)
711PointerAction(wheel: float, pan: Vector2, pinch: float, gameProcessedEvent: bool)
462WindowFocusReleased()
462WindowFocused()
inherited from LayerCollector
731Enabled: bool
731ResetOnSpawn: bool
731ZIndexBehavior: ZIndexBehavior
648GetGuiObjectsAtPosition(x: int, y: int): Instances
462GetLayoutNodeTree(): Dictionary
inherited from GuiBase2d
731AbsolutePosition: Vector2
731AbsoluteRotation: float
731AbsoluteSize: Vector2
731AutoLocalize: bool
731RootLocalizationTable: LocalizationTable
731SelectionBehaviorDown: SelectionBehavior
731SelectionBehaviorLeft: SelectionBehavior
731SelectionBehaviorRight: SelectionBehavior
731SelectionBehaviorUp: SelectionBehavior
731SelectionGroup: bool
525SelectionChanged(amISelected: bool, previousSelection: GuiObject, newSelection: GuiObject)
inherited from Instance
731Archivable: bool
731Capabilities: SecurityCapabilities
731IsInSandbox: bool
731Name: string
731Parent: Instance
731PredictionMode: PredictionMode
731Sandboxed: bool
731UniqueId: UniqueId
576AddTag(tag: string): null
573ClearAllChildren(): null
462Clone(): Instance
573Destroy(): null
486FindFirstAncestor(name: string): Instance
486FindFirstAncestorOfClass(className: string): Instance
486FindFirstAncestorWhichIsA(className: string): Instance
486FindFirstChild(name: string, recursive: bool = false): Instance
486FindFirstChildOfClass(className: string): Instance
486FindFirstChildWhichIsA(className: string, recursive: bool = false): Instance
486FindFirstDescendant(name: string): Instance
563GetActor(): Actor
486GetAttribute(attribute: string): Variant
462GetAttributeChangedSignal(attribute: string): RBXScriptSignal
631GetAttributes(): Dictionary
648GetChildren(): Instances
462GetDebugId(scopeLength: int = 4): string
707GetDescendants(): Instances
486GetFullName(): string
706GetStyled(name: string, selector: string?): Variant
657GetStyledPropertyChangedSignal(property: string): RBXScriptSignal
576GetTags(): Array
576HasTag(tag: string): bool
486IsAncestorOf(descendant: Instance): bool
486IsDescendantOf(ancestor: Instance): bool
664IsPropertyModified(property: string): bool
698QueryDescendants(selector: string): Instances
573Remove(): null
576RemoveTag(tag: string): null
664ResetPropertyToDefault(property: string): null
573SetAttribute(attribute: string, value: Variant): null
462WaitForChild(childName: string, timeOut: double): Instance
731children(): Instances
731clone(): Instance
731destroy(): null
731findFirstChild(name: string, recursive: bool = false): Instance
731getChildren(): Instances
731isDescendantOf(ancestor: Instance): bool
731remove(): null
462AncestryChanged(child: Instance, parent: Instance)
462AttributeChanged(attribute: string)
462ChildAdded(child: Instance)
462ChildRemoved(child: Instance)
462DescendantAdded(descendant: Instance)
462DescendantRemoving(descendant: Instance)
500Destroying()
657StyledPropertiesChanged()
731childAdded(child: Instance)
inherited from Object
731ClassName: string
731className: string
647GetPropertyChangedSignal(property: string): RBXScriptSignal
647IsA(className: string): bool
731isA(className: string): bool
647Changed(property: string)

Removed member index 1

HistoryMember
349HostWidgetWasRestored: bool

Description

PluginGui is an abstract class for GUIs that allow the display of GuiObjects in various Roblox Studio widgets. As of right now, the only available PluginGui type is DockWidgetPluginGui, but there may be more in the future!

History 48

Members 17

BindToClose

Parameters (1)Default
functionFunctionnil
Returns (1)
null

This method binds a function that runs when the user clicks the close button of the PluginGui. The widget closes and its Enabled property becomes false even when a function is bound, so the function can't prevent or delay closing. Use it to perform tasks such as saving work when the widget closes.

For example, the following code saves work when the user closes the widget:

1
2
3
4
5
6
7
local function saveWork()
	-- Save the user's work here.
end

pluginGui:BindToClose(function()
	saveWork()
end)

Call BindToClose() without an argument to unbind the current function:

1
pluginGui:BindToClose()

See also:

History 3

GetRelativeMousePosition

Parameters (0)
No parameters.
Returns (1)
Vector2

GetRelativeMousePosition returns the position of the mouse relative to the top-left corner of the PluginGui. The returned value changes only if a mouse input began on the PluginGui, or if the mouse is presently hovering over the window.

History 2

InputBegan

Parameters (2)
inputInputObject
gameProcessedEventbool

History 1

InputChanged

Parameters (2)
inputInputObject
gameProcessedEventbool

History 1

InputEnded

Parameters (2)
inputInputObject
gameProcessedEventbool

History 1

MouseEnter

Parameters (0)
No parameters.

History 1

MouseLeave

Parameters (0)
No parameters.

History 1

OverrideStudioAction

Parameters (1)
studioActionStudioAction
Returns (1)
StudioActionOverride

History 1

PluginDragDropped

Parameters (1)
dragDataDictionary

PluginDragDropped fires when the user releases their mouse over a PluginGui during a drag operation started by Plugin:StartDrag().

See also:

History 4

PluginDragEntered

Parameters (1)
dragDataDictionary

PluginDragEntered fires when the user's mouse enters the PluginGui during a drag operation started by Plugin:StartDrag().

This event is useful for displaying a "Drop Here" UI on PluginGuis where a drag operation can be dropped. Such a UI should be hidden when either PluginDragLeft or PluginDragDropped fire.

See also:

History 4

PluginDragLeft

Parameters (1)
dragDataDictionary

PluginDragLeft fires when the user's mouse leaves a PluginGui during a drag operation started by Plugin:StartDrag().

This event and PluginDragDropped are useful for hiding a "Drop Here" UI on PluginGuis where a drag operation can be dropped. Such a UI should be shown when either PluginDragEntered fires.

See also:

History 4

PluginDragMoved

Parameters (1)
dragDataDictionary

PluginDragMoved fires when the user's mouse moves within a PluginGui during a drag operation started by Plugin:StartDrag().

See also:

History 4

PointerAction

Parameters (4)
wheelfloat
panVector2
pinchfloat
gameProcessedEventbool

History 1

Title

TypeDefault
string

The title that is displayed above the contents of the PluginGui. Defaults to empty string.

History 6

WindowFocusReleased

Parameters (0)
No parameters.

WindowFocusReleased fires immediately when the user stops interacting with the PluginGui's window, usually by clicking on something not in the window. This functions works similarly to the similarly-named UserInputService.WindowFocusReleased event.

If focus is moving to another PluginGui while the user had this PluginGui in focus, then this event fires before the other's WindowFocused event. However, if the main game window is being put in focus, this event fires after UserInputService.WindowFocused.

History 4

WindowFocused

Parameters (0)
No parameters.

WindowFocused fires immediately when the user starts interacting with the PluginGui's window, usually by clicking on it. This functions works similarly to the similarly-named UserInputService.WindowFocused event. It fires before any GuiObject.InputBegan events related to mouse buttons.

If another PluginGui is in focus and the user focuses this PluginGui, then this event fires after the other's WindowFocusReleased event. However, if the main game window was in focus, this event fires after UserInputService.WindowFocusReleased.

History 4

Removed members 1

HostWidgetWasRestored

TypeDefault
bool
This property is read-only. Its value can be read, but it cannot be modified.

History 2

Tags: [ReadOnly]

Settings