Skip to main content

CmdrXClient

This item only works when running on the client. Client

The CmdrX client singleton and entry point.

Properties

Registry

This item is read only and cannot be modified. Read Only
CmdrXClient.Registry: Registry

Refers to the current command Registry.

Dispatcher

This item is read only and cannot be modified. Read Only
CmdrXClient.Dispatcher: Dispatcher

Refers to the current command Dispatcher.

Util

This item is read only and cannot be modified. Read Only
CmdrXClient.Util: Util

Refers to a table containing many useful utility functions.

Enabled

This item is read only and cannot be modified. Read Only
CmdrXClient.Enabled: boolean

Whether or not CmdrX is enabled (will show via the defined activation keys). Use CmdrXClient:SetEnabled to change.

PlaceName

This item is read only and cannot be modified. Read Only
CmdrXClient.PlaceName: string

The current place name, displayed on the interface. Use CmdrXClient:SetPlaceName to change.

ActivationKeys

This item is read only and cannot be modified. Read Only
CmdrXClient.ActivationKeys: {[Enum.KeyCode]=true}

The list of key codes that will show or hide CmdrX. Use CmdrXClient:SetActivationKeys to change.

Functions

SetActivationKeys

CmdrXClient:SetActivationKeys(keys{Enum.KeyCode}) → ()

Sets the key codes that will used to show or hide CmdrX.

SetPlaceName

CmdrXClient:SetPlaceName(namestring) → ()

Sets the place name label on the interface. This is useful for a quick way to tell what game you're playing in a universe game.

SetEnabled

CmdrXClient:SetEnabled(enabledboolean) → ()

Sets whether or not CmdrX can be shown via the defined activation keys. Useful for when you want users to opt-in to show the console, for instance in a settings menu.

SetActivationUnlocksMouse

CmdrXClient:SetActivationUnlocksMouse(enabledboolean) → ()

Sets if activation will free the mouse.

Show

CmdrXClient:Show() → ()

Shows the CmdrX window. Does nothing if CmdrX isn't enabled.

Hide

CmdrXClient:Hide() → ()

Hides the CmdrX window.

Toggle

CmdrXClient:Toggle() → ()

Toggles the CmdrX window. Does nothing if CmdrX isn't enabled.

SetMashToEnable

CmdrXClient:SetMashToEnable(enabledboolean) → ()

Enables the "Mash to open" feature. This feature, when enabled, requires the activation key to be pressed 5 times within a second to enable CmdrX. This may be helpful to guard against mispresses from opening the window, for example.

SetHideOnLostFocus

CmdrXClient:SetHideOnLostFocus(enabledboolean) → ()

Sets the hide on 'lost focus' feature. This feature, which is enabled by default, will cause CmdrX to hide when the user clicks off the window.

HandleEvent

CmdrXClient:HandleEvent(
namestring,
callback(...any) → ()
) → ()

Sets the network event handler for a certain event type.

Show raw api
{
    "functions": [
        {
            "name": "SetActivationKeys",
            "desc": "Sets the key codes that will used to show or hide CmdrX.",
            "params": [
                {
                    "name": "keys",
                    "desc": "",
                    "lua_type": "{ Enum.KeyCode }"
                }
            ],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 105,
                "path": "CmdrX/CmdrXClient/init.luau"
            }
        },
        {
            "name": "SetPlaceName",
            "desc": "Sets the place name label on the interface. This is useful for a quick way to tell what game you're playing in a universe game.",
            "params": [
                {
                    "name": "name",
                    "desc": "",
                    "lua_type": "string"
                }
            ],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 114,
                "path": "CmdrX/CmdrXClient/init.luau"
            }
        },
        {
            "name": "SetEnabled",
            "desc": "Sets whether or not CmdrX can be shown via the defined activation keys. Useful for when you want users to opt-in to show the console, for instance in a settings menu.",
            "params": [
                {
                    "name": "enabled",
                    "desc": "",
                    "lua_type": "boolean"
                }
            ],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 124,
                "path": "CmdrX/CmdrXClient/init.luau"
            }
        },
        {
            "name": "SetActivationUnlocksMouse",
            "desc": "Sets if activation will free the mouse.",
            "params": [
                {
                    "name": "enabled",
                    "desc": "",
                    "lua_type": "boolean"
                }
            ],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 133,
                "path": "CmdrX/CmdrXClient/init.luau"
            }
        },
        {
            "name": "Show",
            "desc": "Shows the CmdrX window. Does nothing if CmdrX isn't enabled.",
            "params": [],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 142,
                "path": "CmdrX/CmdrXClient/init.luau"
            }
        },
        {
            "name": "Hide",
            "desc": "Hides the CmdrX window.",
            "params": [],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 155,
                "path": "CmdrX/CmdrXClient/init.luau"
            }
        },
        {
            "name": "Toggle",
            "desc": "Toggles the CmdrX window. Does nothing if CmdrX isn't enabled.",
            "params": [],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 164,
                "path": "CmdrX/CmdrXClient/init.luau"
            }
        },
        {
            "name": "SetMashToEnable",
            "desc": "Enables the \"Mash to open\" feature.\nThis feature, when enabled, requires the activation key to be pressed 5 times within a second to [enable](#SetEnabled) CmdrX.\nThis may be helpful to guard against mispresses from opening the window, for example.",
            "params": [
                {
                    "name": "enabled",
                    "desc": "",
                    "lua_type": "boolean"
                }
            ],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 180,
                "path": "CmdrX/CmdrXClient/init.luau"
            }
        },
        {
            "name": "SetHideOnLostFocus",
            "desc": "Sets the hide on 'lost focus' feature.\nThis feature, which is enabled by default, will cause CmdrX to [hide](#Hide) when the user clicks off the window.",
            "params": [
                {
                    "name": "enabled",
                    "desc": "",
                    "lua_type": "boolean"
                }
            ],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 194,
                "path": "CmdrX/CmdrXClient/init.luau"
            }
        },
        {
            "name": "HandleEvent",
            "desc": "Sets the [network event handler](/docs/networkeventhandlers) for a certain event type.",
            "params": [
                {
                    "name": "name",
                    "desc": "",
                    "lua_type": "string"
                },
                {
                    "name": "callback",
                    "desc": "",
                    "lua_type": "(...any) -> ()"
                }
            ],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 203,
                "path": "CmdrX/CmdrXClient/init.luau"
            }
        }
    ],
    "properties": [
        {
            "name": "Registry",
            "desc": "Refers to the current command Registry.",
            "lua_type": "Registry",
            "readonly": true,
            "source": {
                "line": 26,
                "path": "CmdrX/CmdrXClient/init.luau"
            }
        },
        {
            "name": "Dispatcher",
            "desc": "Refers to the current command Dispatcher.",
            "lua_type": "Dispatcher",
            "readonly": true,
            "source": {
                "line": 33,
                "path": "CmdrX/CmdrXClient/init.luau"
            }
        },
        {
            "name": "Util",
            "desc": "Refers to a table containing many useful utility functions.",
            "lua_type": "Util",
            "readonly": true,
            "source": {
                "line": 40,
                "path": "CmdrX/CmdrXClient/init.luau"
            }
        },
        {
            "name": "Enabled",
            "desc": "Whether or not CmdrX is enabled (will show via the defined activation keys). Use [`CmdrXClient:SetEnabled`](#SetEnabled) to change.",
            "lua_type": "boolean",
            "readonly": true,
            "source": {
                "line": 47,
                "path": "CmdrX/CmdrXClient/init.luau"
            }
        },
        {
            "name": "PlaceName",
            "desc": "The current place name, displayed on the interface. Use [`CmdrXClient:SetPlaceName`](#SetPlaceName) to change.",
            "lua_type": "string",
            "readonly": true,
            "source": {
                "line": 54,
                "path": "CmdrX/CmdrXClient/init.luau"
            }
        },
        {
            "name": "ActivationKeys",
            "desc": "The list of key codes that will show or hide CmdrX. Use [`CmdrXClient:SetActivationKeys`](#SetActivationKeys) to change.",
            "lua_type": "{ [Enum.KeyCode] = true }",
            "readonly": true,
            "source": {
                "line": 61,
                "path": "CmdrX/CmdrXClient/init.luau"
            }
        }
    ],
    "types": [],
    "name": "CmdrXClient",
    "desc": "The CmdrX client singleton and entry point.",
    "realm": [
        "Client"
    ],
    "source": {
        "line": 19,
        "path": "CmdrX/CmdrXClient/init.luau"
    }
}