API 参考
正在准备搜索索引…

ImGui.GetMouseDragDelta

  • 获取开始拖动以来的鼠标位移。

    参数

    button
    number = 0

    ImGuiMouseButton 索引:0 左键、1 右键、2 中键。

    lock_threshold
    number = -1.0

    识别为拖动所需的最小像素距离;-1 使用 io.MouseDragThreshold。

    返回值

    相对拖动起点的 {x: dx, y: dy} 屏幕像素位移副本;越过拖动阈值前为零。

    鼠标按钮被按住或刚松开时,返回相对于初始点击位置的位移。

    在鼠标至少一次超过距离阈值之前,返回值保持为零。lock_threshold < 0.0 时使用 io.MouseDragThreshold, io 是 ImGui.viewImGuiIO(ioHandle) 返回的字段视图。

    源码与继承

Icons made by Lorc, Delapouite & Skoll · game-icons.net · CC BY 3.0