本文整理汇总了C++中ci::app::MouseEvent::isAltDown方法的典型用法代码示例。如果您正苦于以下问题:C++ MouseEvent::isAltDown方法的具体用法?C++ MouseEvent::isAltDown怎么用?C++ MouseEvent::isAltDown使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ci::app::MouseEvent
的用法示例。
在下文中一共展示了MouseEvent::isAltDown方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: mouseDown
void GraphNodeHandler::mouseDown(ci::app::MouseEvent &event)
{
if (glm::length(*position - ci::vec2(event.getPos())) < size)
{
if (event.isAltDown())
{
if (selection == Selection::addEdge)
{
selection = Selection::none;
}
else
{
selection = Selection::addEdge;
selectedInFrame = ci::app::getElapsedFrames();
}
}
else
{
selection = Selection::move;
}
event.setHandled(true);
}
else
{
if (selection == Selection::move)
selection = Selection::none;
}
}
示例2: mouseDown
void TouchDebug::mouseDown(const ci::app::MouseEvent& e) {
mReplicating = false;
if(e.isAltDown()) {
if(!mDropTouched){
mEngine.mouseTouchBegin(e, mTouchId + 2);
mDropTouched = true;
} else {
mEngine.mouseTouchEnded(e, mTouchId + 2);
mDropTouched = false;
}
} else if(e.isShiftDown()) {
mReplicating = true;
replicate(e, ds::ui::TouchInfo::Added);
} else if(e.isControlDown()){
if(mTwoTouching){
mTwoTouching = false;
} else {
mTwoTouching = true;
mTwoTouchDown = e.getPos();
}
} else if(mTwoTouching){
mEngine.mouseTouchBegin(e, mTouchId);
int deltaX = e.getPos().x - mTwoTouchDown.x;
int deltaY = e.getPos().y - mTwoTouchDown.y;
ci::app::MouseEvent mouseTwo = ci::app::MouseEvent(e.getWindow(), 0, mTwoTouchDown.x - deltaX, mTwoTouchDown.y - deltaY, e.getNativeModifiers(), e.getWheelIncrement(), e.getNativeModifiers());
mEngine.mouseTouchBegin(mouseTwo, mTouchId + 1);
} else {
mEngine.mouseTouchBegin(e, mTouchId);
}
}
示例3: mouseDrag
void SpawnObjectApp::mouseDrag( ci::app::MouseEvent event )
{
if( event.isAltDown() )
mMayaCam.mouseDrag( event.getPos(), event.isLeftDown(), event.isMiddleDown(), event.isRightDown() );
}
示例4: mouseDown
void SpawnObjectApp::mouseDown( ci::app::MouseEvent event )
{
if( event.isAltDown() )
mMayaCam.mouseDown( event.getPos() );
}