#include <dl_input.h>
◆ KeyNameType
◆ Input()
◆ ~Input()
◆ _set_cursor()
| void dl::Input::_set_cursor |
( |
int |
xpos, |
|
|
int |
ypos, |
|
|
bool |
b_clear_cursor_dt |
|
) |
| |
|
inline |
◆ _set_key()
| void dl::Input::_set_key |
( |
int |
key, |
|
|
bool |
down |
|
) |
| |
|
inline |
设置一个键是否按下
- 注解
- 请勿调用,在轮询事件时会自动调用(按下 与 重复均为真)
在文件 dl_input.h 第 360 行定义.
◆ _set_key_mouse()
| void dl::Input::_set_key_mouse |
( |
int |
key, |
|
|
bool |
down |
|
) |
| |
|
inline |
设置鼠标键是否按下
- 注解
- 请勿调用,在轮询事件时会自动调用(按下 与 重复均为真)
在文件 dl_input.h 第 368 行定义.
◆ ControlCoor()
◆ GetCursorPosition()
| Point dl::Input::GetCursorPosition |
( |
| ) |
|
◆ GetCursorPositionDelta()
| Point dl::Input::GetCursorPositionDelta |
( |
| ) |
|
|
inline |
◆ GetCursorPositionOutWindow()
| Point dl::Input::GetCursorPositionOutWindow |
( |
| ) |
|
|
inline |
◆ GetGamePad()
| GamePad * dl::Input::GetGamePad |
( |
unsigned |
id | ) |
|
返回手柄对象,失败返回nullptr。 @parma[in] id 手柄编号0-3
◆ GetKeyName()
| std::string dl::Input::GetKeyName |
( |
KeyCode |
key_code | ) |
|
◆ GetMouseWheelDelta()
| int dl::Input::GetMouseWheelDelta |
( |
| ) |
|
◆ KeyDown() [1/2]
| bool dl::Input::KeyDown |
( |
KeyCode |
key_code | ) |
|
|
inline |
◆ KeyDown() [2/2]
| bool dl::Input::KeyDown |
( |
MouseCode |
mouse_code | ) |
|
|
inline |
◆ KeyDownAny()
| bool dl::Input::KeyDownAny |
( |
| ) |
|
◆ KeyState() [1/2]
| bool dl::Input::KeyState |
( |
KeyCode |
key_code | ) |
|
|
inline |
检测一个按键是否按下。
- 返回
- 按回的是键盘的按键状态。和KeyUp、KeyDown不同,只要按键是被玩家按下了,就会返回真,否则返回假。
在文件 dl_input.h 第 261 行定义.
◆ KeyState() [2/2]
| bool dl::Input::KeyState |
( |
MouseCode |
mouse_code | ) |
|
|
inline |
◆ KeyUp() [1/2]
| bool dl::Input::KeyUp |
( |
KeyCode |
key_code | ) |
|
|
inline |
◆ KeyUp() [2/2]
| bool dl::Input::KeyUp |
( |
MouseCode |
mouse_code | ) |
|
|
inline |
◆ SetGamePadOpen()
| void dl::Input::SetGamePadOpen |
( |
bool |
open | ) |
|
◆ SetKeyNameType()
◆ SetMousePositionCenter()
| void dl::Input::SetMousePositionCenter |
( |
| ) |
|
◆ SetRunBackground()
| void dl::Input::SetRunBackground |
( |
bool |
run = false | ) |
|
◆ WaitKeyDown()
| bool dl::Input::WaitKeyDown |
( |
KeyCode & |
key_code, |
|
|
bool |
contain_special = false |
|
) |
| |
◆ System
该类的文档由以下文件生成: