eventtarget.cpp

来自「赫赫大名的 OGRE 游戏引擎」· C++ 代码 · 共 27 行

CPP
27
字号
#ifdef HAVE_CONFIG_H
#   include "config.h"
#endif
  
#include "OgrePythonLink.h"
#include "OgreEventTarget.h"

using namespace boost::python;
using namespace Ogre;

class pythonEventTarget : public EventTarget
{
public:
    pythonEventTarget(PyObject* self_) : self(self_)
    { }

    void processEvent(InputEvent* e)
    { return call_method<void>(self, "processEvent", e); }
private:
    PyObject* self;
};

void exportEventTarget()
{
    class_<EventTarget, pythonEventTarget, boost::noncopyable>("EventTarget");
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?