Show raw api
{
"functions": [
{
"name": "new",
"desc": "Constructs a new InputModeTypeSelector",
"params": [
{
"name": "serviceBag",
"desc": "",
"lua_type": "ServiceBag"
},
{
"name": "inputModesTypes",
"desc": "",
"lua_type": "{ InputModeType }"
}
],
"returns": [
{
"desc": "",
"lua_type": "InputModeTypeSelector"
}
],
"function_type": "static",
"source": {
"line": 31,
"path": "src/inputmode/src/Client/InputModeTypeSelector.lua"
}
},
{
"name": "fromObservableBrio",
"desc": "Constructs a new InputModeTypeSelector",
"params": [
{
"name": "serviceBag",
"desc": "",
"lua_type": "ServiceBag"
},
{
"name": "observeInputModesBrio",
"desc": "",
"lua_type": "Observable<Brio<InputModeType>>"
}
],
"returns": [
{
"desc": "",
"lua_type": "InputModeTypeSelector"
}
],
"function_type": "static",
"source": {
"line": 68,
"path": "src/inputmode/src/Client/InputModeTypeSelector.lua"
}
},
{
"name": "GetActiveInputType",
"desc": "Returns the current active mode",
"params": [],
"returns": [
{
"desc": "",
"lua_type": "InputModeType"
}
],
"function_type": "method",
"source": {
"line": 94,
"path": "src/inputmode/src/Client/InputModeTypeSelector.lua"
}
},
{
"name": "ObserveActiveInputType",
"desc": "Observes the current active mode",
"params": [],
"returns": [
{
"desc": "",
"lua_type": "Observable<InputModeType>"
}
],
"function_type": "method",
"source": {
"line": 102,
"path": "src/inputmode/src/Client/InputModeTypeSelector.lua"
}
},
{
"name": "IsActive",
"desc": "Returns true if the input mode is the most recently activated one",
"params": [
{
"name": "inputModeType",
"desc": "",
"lua_type": "InputModeType"
}
],
"returns": [
{
"desc": "",
"lua_type": "boolean"
}
],
"function_type": "method",
"source": {
"line": 112,
"path": "src/inputmode/src/Client/InputModeTypeSelector.lua"
}
},
{
"name": "ObserveIsActive",
"desc": "Observes if the input mode is the most recently activated one",
"params": [
{
"name": "inputModeType",
"desc": "",
"lua_type": "InputModeType"
}
],
"returns": [
{
"desc": "",
"lua_type": "Observable<boolean>"
}
],
"function_type": "method",
"source": {
"line": 124,
"path": "src/inputmode/src/Client/InputModeTypeSelector.lua"
}
},
{
"name": "Bind",
"desc": "Binds the updateBindFunction to the mode selector\n\n```lua\nlocal inputModeTypeSelector = InputModeTypeSelector.new({\n\tInputModeTypes.Mouse;\n\tInputModeTypes.Touch;\n})\n\ninputModeTypeSelector:Bind(function(inputModeType)\n\tif inputModeType == InputModeTypes.Mouse then\n\t\tprint(\"Show mouse input hints\")\n\telseif inputModeType == InputModeTypes.Touch then\n\t\tprint(\"Show touch input hints\")\n\telse\n\t\t-- Unknown input mode\n\t\twarn(\"Unknown input mode\") -- should not occur\n\tend\nend)\n```",
"params": [
{
"name": "updateBindFunction",
"desc": "",
"lua_type": "(newMode: InputModeType, modeMaid: Maid) -> ()"
}
],
"returns": [
{
"desc": "",
"lua_type": "InputModeTypeSelector"
}
],
"function_type": "method",
"source": {
"line": 179,
"path": "src/inputmode/src/Client/InputModeTypeSelector.lua"
}
},
{
"name": "RemoveInputModeType",
"desc": "Removes the input mode",
"params": [
{
"name": "inputModeType",
"desc": "",
"lua_type": "InputModeType"
}
],
"returns": [],
"function_type": "method",
"source": {
"line": 206,
"path": "src/inputmode/src/Client/InputModeTypeSelector.lua"
}
},
{
"name": "AddInputModeType",
"desc": "Adds a new input mode",
"params": [
{
"name": "inputModeType",
"desc": "",
"lua_type": "InputModeType"
}
],
"returns": [],
"function_type": "method",
"source": {
"line": 231,
"path": "src/inputmode/src/Client/InputModeTypeSelector.lua"
}
},
{
"name": "Destroy",
"desc": "Cleans up the input mode selector.\n\n:::info\nThis should be called whenever the mode selector is done being used.\n:::",
"params": [],
"returns": [],
"function_type": "method",
"source": {
"line": 271,
"path": "src/inputmode/src/Client/InputModeTypeSelector.lua"
}
}
],
"properties": [
{
"name": "Changed",
"desc": "Event that fires whenever the active mode changes.",
"lua_type": "Signal<InputModeType, InputModeType> -- newMode, oldMode",
"source": {
"line": 52,
"path": "src/inputmode/src/Client/InputModeTypeSelector.lua"
}
},
{
"name": "Value",
"desc": "The current active input mode",
"lua_type": "InputModeType?",
"source": {
"line": 140,
"path": "src/inputmode/src/Client/InputModeTypeSelector.lua"
}
}
],
"types": [],
"name": "InputModeTypeSelector",
"desc": "Selects the most recent input mode and attempts to identify the best state from it.",
"source": {
"line": 5,
"path": "src/inputmode/src/Client/InputModeTypeSelector.lua"
}
}