mousemotionlistener.cpp
来自「赫赫大名的 OGRE 游戏引擎」· C++ 代码 · 共 31 行
CPP
31 行
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
#include "OgrePythonLink.h"
#include "OgreEventListeners.h"
using namespace boost::python;
using namespace Ogre;
class pythonMouseMotionListener : public MouseMotionListener
{
public:
pythonMouseMotionListener(PyObject* self_) : self(self_)
{ }
void mouseMoved(MouseEvent* e)
{ return call_method<void>(self, "mouseMoved", e); }
void mouseDragged(MouseEvent* e)
{ return call_method<void>(self, "mouseDragged", e); }
private:
PyObject* self;
};
void exportMouseMotionListener()
{
class_<MouseMotionListener, pythonMouseMotionListener, boost::noncopyable>(
"MouseMotionListener", no_init);
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?