1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-02-03 17:54:06 +00:00
OpenMW/apps/openmw/mwlua/playerscripts.hpp
2021-07-09 20:03:27 +02:00

26 lines
552 B
C++

#ifndef MWLUA_PLAYERSCRIPTS_H
#define MWLUA_PLAYERSCRIPTS_H
#include "localscripts.hpp"
namespace MWLua
{
class PlayerScripts : public LocalScripts
{
public:
PlayerScripts(LuaUtil::LuaState* lua, const LObject& obj) : LocalScripts(lua, obj)
{
registerEngineHandlers({&mKeyPressHandlers});
}
void keyPress(int sym, int mod) { callEngineHandlers(mKeyPressHandlers, sym, mod); }
private:
EngineHandlerList mKeyPressHandlers{"onKeyPress"};
};
}
#endif // MWLUA_PLAYERSCRIPTS_H