示例#1
0
bool MouseHandler::_handleMouseRelease(float x, float y, int button)
{
    if (button == osgGA::GUIEventAdapter::LEFT_MOUSE_BUTTON)
        return _doMouseEvent(
            x,
            y,
            &WindowManager::mouseReleasedLeft
            );

    else if (button == osgGA::GUIEventAdapter::RIGHT_MOUSE_BUTTON)
        return _doMouseEvent(
            x,
            y,
            &WindowManager::mouseReleasedRight
            );

    else if (button == osgGA::GUIEventAdapter::MIDDLE_MOUSE_BUTTON)
        return _doMouseEvent(
            x,
            y,
            &WindowManager::mouseReleasedMiddle
            );

    else
        return false;
}
示例#2
0
bool MouseHandler::_handleMouseDrag(float x, float y, int /*button*/)
{
    return _doMouseEvent(x, y, &WindowManager::pointerDrag);
}
示例#3
0
bool MouseHandler::_handleMouseScroll(float x, float y, int)
{
    return _doMouseEvent(x, y, &WindowManager::mouseScroll);
}
示例#4
0
bool MouseHandler::_handleMouseMove(float x, float y, int button) {
    return _doMouseEvent(x, y, &WindowManager::pointerMove);
}