📄 inputhandler.h
字号:
#ifndef INPUTHANDLER_H
#define INPUTHANDLER_H
#include <Ogre.h>
#include <OIS/OIS.h>
#include <CEGUI/CEGUI.h>
#include <OgreCEGUIRenderer.h>
#include "NxOgre.h"
#include "Application.h"
using namespace Ogre;
using namespace NxOgre;
class Application;
class InputHandler : public FrameListener
{
public:
InputHandler(OIS::Keyboard *keyboard, OIS::Mouse *mouse, Application *app);
bool frameStarted(const FrameEvent& evt);
private:
bool freeCameraHandle(const FrameEvent& evt);
bool wowCameraHandle(const FrameEvent& evt);
bool playerHandle(const FrameEvent& evt);
bool switchViewHandle(const FrameEvent& evt);
OIS::Keyboard *mKeyboard;
OIS::Mouse *mMouse;
bool mMouseDown; // Whether or not the left mouse button was down last frame
Real mToggle; // The time left until next toggle
Real mRotate; // The rotate constant
Real mMove; // The movement constant
Application* mApp;
typedef bool (InputHandler::*CameraHandle)(const FrameEvent&);
CameraHandle currentCameraHandler;
void adjustCamera();
};
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -