|
|
@ -221,7 +221,7 @@ namespace MWLua
|
|
|
|
api["getControlSwitch"] = [input](std::string_view key) { return input->getControlSwitch(key); };
|
|
|
|
api["getControlSwitch"] = [input](std::string_view key) { return input->getControlSwitch(key); };
|
|
|
|
api["setControlSwitch"] = [input](std::string_view key, bool v) { input->toggleControlSwitch(key, v); };
|
|
|
|
api["setControlSwitch"] = [input](std::string_view key, bool v) { input->toggleControlSwitch(key, v); };
|
|
|
|
|
|
|
|
|
|
|
|
api["getKeyName"] = [](SDL_Scancode code) { return SDL_GetKeyName(SDL_GetKeyFromScancode(code)); };
|
|
|
|
api["getKeyName"] = [](SDL_Scancode code) { return SDL_GetScancodeName(code); };
|
|
|
|
|
|
|
|
|
|
|
|
api["ACTION"] = LuaUtil::makeStrictReadOnly(context.mLua->tableFromPairs<std::string_view, MWInput::Actions>({
|
|
|
|
api["ACTION"] = LuaUtil::makeStrictReadOnly(context.mLua->tableFromPairs<std::string_view, MWInput::Actions>({
|
|
|
|
{ "GameMenu", MWInput::A_GameMenu },
|
|
|
|
{ "GameMenu", MWInput::A_GameMenu },
|
|
|
|