BasicPane
Base UI object with visibility and a maid. BasicPane provides three points of utility.
- BasicPane contain visibility API. It's very standard practice to use the VisibleChanged event and pass visibility up or down the entire stack.
-- Standard visibility chaining
self._maid:GiveTask(self.VisibleChanged:Connect(function(isVisible, doNotAnimate)
self._otherComponent:SetVisible(isVisible, doNotAnimate)
end))
-
BasicPane contains a maid which cleans up upon :Destroy(). This just saves some time typing.
-
Finally, BasicPanes, by convention (although not requirement), contain a .Gui object which can generally be safely reparented to another object.
Properties
Gui
BasicPane.Gui: Instance?Gui object which can be reparented or whatever
VisibleChanged
Fires whenever visibility changes. FIres with isVisible, doNotAnimate, and a maid which has the lifetime of the visibility.
info
Do not use the Maid if you want the code to work in Deferred signal mode.
Functions
isBasicPane
BasicPane.isBasicPane(value: any) → booleanReturns whether the value is a basic pane
new
Constructs a new BasicPane with the .Gui property set.
SetVisible
BasicPane:SetVisible(isVisible: boolean,--
Whether or not the pane should be visible
doNotAnimate: boolean?--
True if this visiblity should not animate
) → ()Sets the BasicPane to be visible
Show
BasicPane:Show(doNotAnimate: boolean?--
True if this visiblity should not animate
) → ()Shows the pane
Hide
BasicPane:Hide(doNotAnimate: boolean?--
True if this visiblity should not animate
) → ()Hides the pane
Toggle
BasicPane:Toggle(doNotAnimate: boolean?--
True if this visiblity should not animate
) → ()Toggles the pane
IsVisible
BasicPane:IsVisible() → booleanReturns if the pane is visible
Destroy
BasicPane:Destroy() → ()Cleans up the BasicPane, invoking Maid:DoCleaning() on the BasicPane and setting the metatable to nil.