624 B
624 B
InputManager::IsMouseButtonClicked
查询鼠标按键是否在本帧刚被按下。
bool IsMouseButtonClicked(MouseButton button) const;
行为说明
当前实现与 IsKeyPressed 类似,判断条件是:
m_mouseButtonDownThisFrame[index] && !m_mouseButtonDownLastFrame[index]
它表示的是“本帧按下边沿”,而不是完整的点击手势。
参数
button- 要查询的鼠标按键。
返回值
bool- 当前帧是否刚被按下。