docs: rebuild Input API content
This commit is contained in:
@@ -1,30 +1,20 @@
|
||||
# InputManager::OnMouseWheel
|
||||
|
||||
公开方法,详见头文件声明。
|
||||
获取鼠标滚轮事件通道。
|
||||
|
||||
```cpp
|
||||
Core::Event<const MouseWheelEvent&>& OnMouseWheel();
|
||||
```
|
||||
|
||||
该方法声明于 `XCEngine/Input/InputManager.h`,当前页面用于固定 `InputManager` 类目录下的方法级 canonical 路径。
|
||||
## 行为说明
|
||||
|
||||
**参数:** 无。
|
||||
当前事件会在 [ProcessMouseWheel](ProcessMouseWheel.md) 中同步触发。它和 `GetMouseScrollDelta` 的区别在于:事件可以立即响应每次滚轮输入,而轮询接口只保留当前保存的一个 delta。
|
||||
|
||||
**返回:** `Core::Event<const MouseWheelEvent&>&` - 返回值语义详见头文件声明。
|
||||
## 返回值
|
||||
|
||||
**示例:**
|
||||
|
||||
```cpp
|
||||
#include <XCEngine/Input/InputManager.h>
|
||||
|
||||
void Example() {
|
||||
XCEngine::Input::InputManager object;
|
||||
// 根据上下文补齐参数后调用 InputManager::OnMouseWheel(...)。
|
||||
(void)object;
|
||||
}
|
||||
```
|
||||
- `Core::Event<const MouseWheelEvent&>&` - 鼠标滚轮事件通道。
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [返回类总览](InputManager.md)
|
||||
- [返回模块目录](../Input.md)
|
||||
- [返回类型总览](InputManager.md)
|
||||
- [ProcessMouseWheel](ProcessMouseWheel.md)
|
||||
|
||||
Reference in New Issue
Block a user