mrkeyboard.h
来自「Games programming all in one code chapte」· C头文件 代码 · 共 38 行
H
38 行
/* 'mrKeyboard.h' */
/* Mirus base types header */
#include "mrDatatypes.h"
/* Mirus error definitions header */
#include "mrError.h"
/* Mirus Input Manafer header file */
#include "mrInputManager.h"
/* Windows header file */
#include <windows.h>
/* Direct Music header file */
#include <dinput.h>
/* Include this file only once */
#pragma once
/* Mirus Keyboard class */
class mrKeyboard
{
protected:
/* DirectInput objects */
LPDIRECTINPUTDEVICE8 m_lpkDIDevice;
/* Our key buffer */
mrUInt8 m_iKeyBuffer [256];
public:
/* Constructors / Destructor */
mrKeyboard (void);
~mrKeyboard (void);
/* Keyboard manipulation routines */
mrError32 Init (HWND hWindow);
mrError32 Update (void);
mrBool32 IsButtonDown (mrUInt32 iButton);
mrBool32 IsButtonUp (mrUInt32 iButton);
};
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?