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
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.
Gui
BasicPane.Gui:
Instance?
Gui object which can be reparented or whatever
Functions
new
Constructs a new BasicPane with the .Gui property set.
isBasicPane
BasicPane.
isBasicPane
(
value:
any
) →
boolean
Returns whether the value is a basic pane
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
ObserveVisible
Returns an observable that observes visibility
ObserveVisibleBrio
BasicPane:
ObserveVisibleBrio
(
predicate:
function
|
nil
--
Optional predicate. If not includeded returns the value.
) →
Observable
<
Brio
<
boolean
>
>
Returns an observable that observes visibility
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
(
) →
boolean
Returns if the pane is visible
Destroy
BasicPane:
Destroy
(
) →
(
)
Cleans up the BasicPane, invoking Maid:DoCleaning() on the BasicPane and setting the metatable to nil.