Skip to main content

GenericScreenGuiProvider

Providers screenGuis with a given display order for easy use.

return GenericScreenGuiProvider.new({
  CLOCK = 5; -- Register layers here
  BLAH = 8;
  CHAT = 10;
})

In a script that needs a new screen gui, do this:

-- Load your games provider (see above for the registration)
local screenGuiProvider = require("ScreenGuiProvider")

-- Yay, you now have a new screen gui
local screenGui = screenGuiProvider:Get("CLOCK")
gui.Parent = screenGui

Functions

new

GenericScreenGuiProvider.new(orders{[string]number}) → GenericScreenGuiProvider

Constructs a new screen gui provider.

ObserveScreenGui

GenericScreenGuiProvider:ObserveScreenGui(orderNamestring) → Observable<Instance>

Returns a blend ScreenGui.

Get

GenericScreenGuiProvider:Get(
orderNamestring--

Order name of display order

) → ScreenGui

Returns a new ScreenGui at DisplayOrder specified

GetDisplayOrder

GenericScreenGuiProvider:GetDisplayOrder(
orderNamestring--

Order name of display order

) → number

Retrieve the display order for a given order.

Show raw api
{
    "functions": [
        {
            "name": "new",
            "desc": "Constructs a new screen gui provider.",
            "params": [
                {
                    "name": "orders",
                    "desc": "",
                    "lua_type": "{ [string]: number }"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "GenericScreenGuiProvider"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 45,
                "path": "src/genericscreenguiprovider/src/Client/GenericScreenGuiProvider.lua"
            }
        },
        {
            "name": "ObserveScreenGui",
            "desc": "Returns a blend ScreenGui.",
            "params": [
                {
                    "name": "orderName",
                    "desc": "",
                    "lua_type": "string"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Observable<Instance>"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 93,
                "path": "src/genericscreenguiprovider/src/Client/GenericScreenGuiProvider.lua"
            }
        },
        {
            "name": "Get",
            "desc": "Returns a new ScreenGui at DisplayOrder specified",
            "params": [
                {
                    "name": "orderName",
                    "desc": "Order name of display order",
                    "lua_type": "string"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "ScreenGui"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 121,
                "path": "src/genericscreenguiprovider/src/Client/GenericScreenGuiProvider.lua"
            }
        },
        {
            "name": "GetDisplayOrder",
            "desc": "Retrieve the display order for a given order.",
            "params": [
                {
                    "name": "orderName",
                    "desc": "Order name of display order",
                    "lua_type": "string"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "number"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 153,
                "path": "src/genericscreenguiprovider/src/Client/GenericScreenGuiProvider.lua"
            }
        }
    ],
    "properties": [],
    "types": [],
    "name": "GenericScreenGuiProvider",
    "desc": "Providers screenGuis with a given display order for easy use.\n\n```lua\nreturn GenericScreenGuiProvider.new({\n  CLOCK = 5; -- Register layers here\n  BLAH = 8;\n  CHAT = 10;\n})\n```\n\nIn a script that needs a new screen gui, do this:\n\n```lua\n-- Load your games provider (see above for the registration)\nlocal screenGuiProvider = require(\"ScreenGuiProvider\")\n\n-- Yay, you now have a new screen gui\nlocal screenGui = screenGuiProvider:Get(\"CLOCK\")\ngui.Parent = screenGui\n```",
    "source": {
        "line": 25,
        "path": "src/genericscreenguiprovider/src/Client/GenericScreenGuiProvider.lua"
    }
}