Skip to main content

BasicPane

Base UI object with visibility and a maid. BasicPane provides three points of utility.

  1. 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))
  1. BasicPane contains a maid which cleans up upon :Destroy(). This just saves some time typing.

  2. Finally, BasicPanes, by convention (although not requirement), contain a .Gui object which can generally be safely reparented to another object.

Properties

VisibleChanged

BasicPane.VisibleChanged: Signal<boolean,boolean>

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

isBasicPane

BasicPane.isBasicPane(valueany) → boolean

Returns whether the value is a basic pane

new

BasicPane.new(
guiGuiBase?--

Optional Gui object

) → BasicPane

Constructs a new BasicPane with the .Gui property set.

SetVisible

BasicPane:SetVisible(
isVisibleboolean,--

Whether or not the pane should be visible

doNotAnimateboolean?--

True if this visiblity should not animate

) → ()

Sets the BasicPane to be visible

ObserveVisible

BasicPane:ObserveVisible() → Observable<boolean>

Returns an observable that observes visibility

ObserveVisibleBrio

BasicPane:ObserveVisibleBrio(
predicatefunction | nil--

Optional predicate. If not includeded returns the value.

) → Observable<Brio<boolean>>

Returns an observable that observes visibility

Show

BasicPane:Show(
doNotAnimateboolean?--

True if this visiblity should not animate

) → ()

Shows the pane

Hide

BasicPane:Hide(
doNotAnimateboolean?--

True if this visiblity should not animate

) → ()

Hides the pane

Toggle

BasicPane:Toggle(
doNotAnimateboolean?--

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.

Show raw api
{
    "functions": [
        {
            "name": "isBasicPane",
            "desc": "Returns whether the value is a basic pane",
            "params": [
                {
                    "name": "value",
                    "desc": "",
                    "lua_type": "any"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "boolean"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 38,
                "path": "src/basicpane/src/Shared/BasicPane.lua"
            }
        },
        {
            "name": "new",
            "desc": "Constructs a new BasicPane with the .Gui property set.",
            "params": [
                {
                    "name": "gui",
                    "desc": "Optional Gui object",
                    "lua_type": "GuiBase?"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "BasicPane"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 49,
                "path": "src/basicpane/src/Shared/BasicPane.lua"
            }
        },
        {
            "name": "SetVisible",
            "desc": "Sets the BasicPane to be visible",
            "params": [
                {
                    "name": "isVisible",
                    "desc": "Whether or not the pane should be visible",
                    "lua_type": "boolean"
                },
                {
                    "name": "doNotAnimate",
                    "desc": "True if this visiblity should not animate",
                    "lua_type": "boolean?"
                }
            ],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 91,
                "path": "src/basicpane/src/Shared/BasicPane.lua"
            }
        },
        {
            "name": "ObserveVisible",
            "desc": "Returns an observable that observes visibility",
            "params": [],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Observable<boolean>"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 102,
                "path": "src/basicpane/src/Shared/BasicPane.lua"
            }
        },
        {
            "name": "ObserveVisibleBrio",
            "desc": "Returns an observable that observes visibility",
            "params": [
                {
                    "name": "predicate",
                    "desc": "Optional predicate. If not includeded returns the value.",
                    "lua_type": "function | nil"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Observable<Brio<boolean>>"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 112,
                "path": "src/basicpane/src/Shared/BasicPane.lua"
            }
        },
        {
            "name": "Show",
            "desc": "Shows the pane",
            "params": [
                {
                    "name": "doNotAnimate",
                    "desc": "True if this visiblity should not animate",
                    "lua_type": "boolean?"
                }
            ],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 122,
                "path": "src/basicpane/src/Shared/BasicPane.lua"
            }
        },
        {
            "name": "Hide",
            "desc": "Hides the pane",
            "params": [
                {
                    "name": "doNotAnimate",
                    "desc": "True if this visiblity should not animate",
                    "lua_type": "boolean?"
                }
            ],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 130,
                "path": "src/basicpane/src/Shared/BasicPane.lua"
            }
        },
        {
            "name": "Toggle",
            "desc": "Toggles the pane",
            "params": [
                {
                    "name": "doNotAnimate",
                    "desc": "True if this visiblity should not animate",
                    "lua_type": "boolean?"
                }
            ],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 138,
                "path": "src/basicpane/src/Shared/BasicPane.lua"
            }
        },
        {
            "name": "IsVisible",
            "desc": "Returns if the pane is visible",
            "params": [],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "boolean"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 146,
                "path": "src/basicpane/src/Shared/BasicPane.lua"
            }
        },
        {
            "name": "Destroy",
            "desc": "Cleans up the BasicPane, invoking Maid:DoCleaning() on the BasicPane and\nsetting the metatable to nil.",
            "params": [],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 154,
                "path": "src/basicpane/src/Shared/BasicPane.lua"
            }
        }
    ],
    "properties": [
        {
            "name": "VisibleChanged",
            "desc": "Fires whenever visibility changes. FIres with isVisible, doNotAnimate, and a maid which\nhas the lifetime of the visibility.\n\n:::info\nDo not use the Maid if you want the code to work in Deferred signal mode.\n:::\n\n\t",
            "lua_type": "Signal<boolean, boolean>",
            "source": {
                "line": 66,
                "path": "src/basicpane/src/Shared/BasicPane.lua"
            }
        },
        {
            "name": "Gui",
            "desc": "Gui object which can be reparented or whatever\n\n\t\t",
            "lua_type": "Instance?",
            "source": {
                "line": 79,
                "path": "src/basicpane/src/Shared/BasicPane.lua"
            }
        }
    ],
    "types": [],
    "name": "BasicPane",
    "desc": "Base UI object with visibility and a maid. BasicPane provides three points of utility.\n\n1. BasicPane contain visibility API. It's very standard practice to use the VisibleChanged event and\npass visibility up or down the entire stack.\n\n```lua\n-- Standard visibility chaining\nself._maid:GiveTask(self.VisibleChanged:Connect(function(isVisible, doNotAnimate)\n\tself._otherComponent:SetVisible(isVisible, doNotAnimate)\nend))\n```\n\n2. BasicPane contains a maid which cleans up upon :Destroy(). This just saves some time typing.\n\n3. Finally, BasicPanes, by convention (although not requirement), contain a .Gui object which can generally\nbe safely reparented to another object.",
    "source": {
        "line": 21,
        "path": "src/basicpane/src/Shared/BasicPane.lua"
    }
}