inputhandler.h
来自「坦克大战」· C头文件 代码 · 共 45 行
H
45 行
#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 + =
减小字号Ctrl + -
显示快捷键?