docs: rebuild Input API content
This commit is contained in:
@@ -1,31 +1,32 @@
|
||||
# InputManager::ProcessTextInput
|
||||
|
||||
公开方法,详见头文件声明。
|
||||
向输入系统注入一个文本输入事件。
|
||||
|
||||
```cpp
|
||||
void ProcessTextInput(char c);
|
||||
```
|
||||
|
||||
该方法声明于 `XCEngine/Input/InputManager.h`,当前页面用于固定 `InputManager` 类目录下的方法级 canonical 路径。
|
||||
## 行为说明
|
||||
|
||||
**参数:**
|
||||
- `c` - 参数语义详见头文件声明。
|
||||
当前实现会:
|
||||
|
||||
**返回:** `void` - 无返回值。
|
||||
- 如果未初始化,直接返回
|
||||
- 构造 `TextInputEvent`
|
||||
- 把 `character` 设为 `c`
|
||||
- 把 `text` 构造成长度为 1 的 `Containers::String`
|
||||
- 同步触发 `m_onTextInput`
|
||||
|
||||
**示例:**
|
||||
它适合处理字符输入,而不是通用按键状态。
|
||||
|
||||
```cpp
|
||||
#include <XCEngine/Input/InputManager.h>
|
||||
## 参数
|
||||
|
||||
void Example() {
|
||||
XCEngine::Input::InputManager object;
|
||||
// 根据上下文补齐参数后调用 InputManager::ProcessTextInput(...)。
|
||||
(void)object;
|
||||
}
|
||||
```
|
||||
- `c` - 输入字符。
|
||||
|
||||
## 返回值
|
||||
|
||||
- 无。
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [返回类总览](InputManager.md)
|
||||
- [返回模块目录](../Input.md)
|
||||
- [返回类型总览](InputManager.md)
|
||||
- [OnTextInput](OnTextInput.md)
|
||||
|
||||
Reference in New Issue
Block a user