CmdrClient
The Cmdr client singleton and entry point.
Properties
Registry
This item is read only and cannot be modified. Read OnlyCmdrClient.Registry:
Registry
Refers to the current command Registry.
Dispatcher
This item is read only and cannot be modified. Read OnlyCmdrClient.Dispatcher:
Dispatcher
Refers to the current command Dispatcher.
Util
This item is read only and cannot be modified. Read OnlyCmdrClient.Util:
Util
Refers to a table containing many useful utility functions.
Enabled
This item is read only and cannot be modified. Read OnlyCmdrClient.Enabled:
boolean
Whether or not Cmdr is enabled (will show via the defined activation keys). Use CmdrClient:SetEnabled
to change.
PlaceName
This item is read only and cannot be modified. Read OnlyCmdrClient.PlaceName:
string
The current place name, displayed on the interface. Use CmdrClient:SetPlaceName
to change.
ActivationKeys
This item is read only and cannot be modified. Read OnlyCmdrClient.ActivationKeys:
{
[
Enum.KeyCode
]
=
true
}
The list of key codes that will show or hide Cmdr. Use CmdrClient:SetActivationKeys
to change.
Functions
SetActivationKeys
CmdrClient:
SetActivationKeys
(
keys:
{
Enum.KeyCode
}
) →
(
)
Sets the key codes that will used to show or hide Cmdr.
SetPlaceName
CmdrClient:
SetPlaceName
(
name:
string
) →
(
)
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
CmdrClient:
SetEnabled
(
enabled:
boolean
) →
(
)
Sets whether or not Cmdr 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
CmdrClient:
SetActivationUnlocksMouse
(
enabled:
boolean
) →
(
)
Sets if activation will free the mouse.
Show
CmdrClient:
Show
(
) →
(
)
Shows the Cmdr window. Does nothing if Cmdr isn't enabled.
Hide
CmdrClient:
Hide
(
) →
(
)
Hides the Cmdr window.
Toggle
CmdrClient:
Toggle
(
) →
(
)
Toggles the Cmdr window. Does nothing if Cmdr isn't enabled.
SetMashToEnable
CmdrClient:
SetMashToEnable
(
enabled:
boolean
) →
(
)
Enables the "Mash to open" feature. This feature, when enabled, requires the activation key to be pressed 5 times within a second to enable Cmdr. This may be helpful to guard against mispresses from opening the window, for example.
SetHideOnLostFocus
CmdrClient:
SetHideOnLostFocus
(
enabled:
boolean
) →
(
)
Sets the hide on 'lost focus' feature. This feature, which is enabled by default, will cause Cmdr to hide when the user clicks off the window.
HandleEvent
CmdrClient:
HandleEvent
(
name:
string
,
callback:
(
...any
)
→
(
)
) →
(
)
Sets the network event handler for a certain event type.