Skip to main content

ProximityPromptInputUtils

Utility functions to configure a proximity prompt based upon the input key map given.

Functions

newInputKeyMapFromPrompt

ProximityPromptInputUtils.newInputKeyMapFromPrompt(promptProximityPrompt) → InputKeyMapList

Creates an InputKeyMapList from a proximity prompt.

configurePromptFromInputKeyMap

ProximityPromptInputUtils.configurePromptFromInputKeyMap(
inputKeyMapListInputKeyMapList
) → ()

Sets the key codes for a proximity prompt to match an inputKeyMapList

getFirstInputKeyCode

ProximityPromptInputUtils.getFirstInputKeyCode(
inputKeyMapListInputKeyMapList,
inputModeTypeInputModeType
) → KeyCode?

Picks the first keyCode that matches the inputModeType.

Show raw api
{
    "functions": [
        {
            "name": "newInputKeyMapFromPrompt",
            "desc": "Creates an InputKeyMapList from a proximity prompt.",
            "params": [
                {
                    "name": "prompt",
                    "desc": "",
                    "lua_type": "ProximityPrompt"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "InputKeyMapList"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 22,
                "path": "src/inputkeymaputils/src/Shared/ProximityPromptInputUtils.lua"
            }
        },
        {
            "name": "configurePromptFromInputKeyMap",
            "desc": "Sets the key codes for a proximity prompt to match an inputKeyMapList",
            "params": [
                {
                    "name": "prompt",
                    "desc": "",
                    "lua_type": "ProximityPrompt"
                },
                {
                    "name": "inputKeyMapList",
                    "desc": "",
                    "lua_type": "InputKeyMapList"
                }
            ],
            "returns": [],
            "function_type": "static",
            "source": {
                "line": 42,
                "path": "src/inputkeymaputils/src/Shared/ProximityPromptInputUtils.lua"
            }
        },
        {
            "name": "getFirstInputKeyCode",
            "desc": "Picks the first keyCode that matches the inputModeType.",
            "params": [
                {
                    "name": "inputKeyMapList",
                    "desc": "",
                    "lua_type": "InputKeyMapList"
                },
                {
                    "name": "inputModeType",
                    "desc": "",
                    "lua_type": "InputModeType"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "KeyCode?"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 65,
                "path": "src/inputkeymaputils/src/Shared/ProximityPromptInputUtils.lua"
            }
        }
    ],
    "properties": [],
    "types": [],
    "name": "ProximityPromptInputUtils",
    "desc": "Utility functions to configure a proximity prompt based upon the\ninput key map given.",
    "source": {
        "line": 6,
        "path": "src/inputkeymaputils/src/Shared/ProximityPromptInputUtils.lua"
    }
}