Skip to main content

BasicPaneUtils

Functions

observeVisible

BasicPaneUtils.observeVisible(basicPaneBasicPane) → Observable<boolean>

Observes visibility of the basicPane, returning true when visible and false otherwise.

BasicPaneUtils.observeVisible(basicPane):Subscribe(function(isVisible)
	print("isVisible", isVisible) --> false
end)

whenVisibleBrio

BasicPaneUtils.whenVisibleBrio(createBasicPane(maidMaid) → BasicPane) → (sourceObservable<boolean>) → Observable<Brio<GuiBase>>

Shows the basic pane only when the emitting observable is visible. This allows the basic pane 1 second to hide. If the pane gets reshown in that time it will reshow it.

This can help lead to performance gains when you have a generally hidden pane underneath another one and it needs to be shown.

See GuiVisibleManager for the OOP version.

Rx.of(true):Pipe({
	BasicPaneUtils.whenVisibleBrio(function(maid)
		-- generally you'd have your subclass here
		local pane = BasicPane.new()
		pane.Gui.Parent = screenGui

		return pane
	end)
})

observePercentVisible

BasicPaneUtils.observePercentVisible(basicPaneBasicPane) → Observable<number>

Observes percent visibility. Useful in Blend.

toTransparency

BasicPaneUtils.toTransparency(sourceObservable<number>) → Observable<number>

Convert percentVisible observable to transparency. Useful for Blend.

observeShow

BasicPaneUtils.observeShow(basicPaneBasicPane) → Observable<boolean>

Observes showing a basic pane. Useful for playing back animations only when the pane shows.

Show raw api
{
    "functions": [
        {
            "name": "observeVisible",
            "desc": "Observes visibility of the basicPane, returning true when visible and false otherwise.\n\n```lua\nBasicPaneUtils.observeVisible(basicPane):Subscribe(function(isVisible)\n\tprint(\"isVisible\", isVisible) --> false\nend)\n```",
            "params": [
                {
                    "name": "basicPane",
                    "desc": "",
                    "lua_type": "BasicPane"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Observable<boolean>"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 27,
                "path": "src/basicpane/src/Shared/BasicPaneUtils.lua"
            }
        },
        {
            "name": "whenVisibleBrio",
            "desc": "Shows the basic pane only when the emitting observable is visible. This\nallows the basic pane 1 second to hide. If the pane gets reshown in that\ntime it will reshow it.\n\nThis can help lead to performance gains when you have a generally hidden pane\nunderneath another one and it needs to be shown.\n\nSee [GuiVisibleManager] for the OOP version.\n\n```lua\nRx.of(true):Pipe({\n\tBasicPaneUtils.whenVisibleBrio(function(maid)\n\t\t-- generally you'd have your subclass here\n\t\tlocal pane = BasicPane.new()\n\t\tpane.Gui.Parent = screenGui\n\n\t\treturn pane\n\tend)\n})\n```",
            "params": [
                {
                    "name": "createBasicPane",
                    "desc": "",
                    "lua_type": "(maid: Maid) -> BasicPane"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "(source: Observable<boolean>) -> Observable<Brio<GuiBase>>"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 58,
                "path": "src/basicpane/src/Shared/BasicPaneUtils.lua"
            }
        },
        {
            "name": "observePercentVisible",
            "desc": "Observes percent visibility. Useful in [Blend].",
            "params": [
                {
                    "name": "basicPane",
                    "desc": "",
                    "lua_type": "BasicPane"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Observable<number>"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 121,
                "path": "src/basicpane/src/Shared/BasicPaneUtils.lua"
            }
        },
        {
            "name": "toTransparency",
            "desc": "Convert percentVisible observable to transparency. Useful for [Blend].",
            "params": [
                {
                    "name": "source",
                    "desc": "",
                    "lua_type": "Observable<number>"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Observable<number>"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 140,
                "path": "src/basicpane/src/Shared/BasicPaneUtils.lua"
            }
        },
        {
            "name": "observeShow",
            "desc": "Observes showing a basic pane. Useful for playing back animations only\nwhen the pane shows.",
            "params": [
                {
                    "name": "basicPane",
                    "desc": "",
                    "lua_type": "BasicPane"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Observable<boolean>"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 151,
                "path": "src/basicpane/src/Shared/BasicPaneUtils.lua"
            }
        }
    ],
    "properties": [],
    "types": [],
    "name": "BasicPaneUtils",
    "desc": "",
    "source": {
        "line": 4,
        "path": "src/basicpane/src/Shared/BasicPaneUtils.lua"
    }
}