Пример #1
0
bool XRect::touchBeganInternal( ci::app::TouchEvent::Touch touch )
{
	bool hit = hitTest( touch.getPos() );
	if (hit && mScript)
		mScript->call("touchBegan", touch.getPos().x, touch.getPos().y);
    return hit;
}
Пример #2
0
bool ThreeStateButton::touchEnded(ci::app::TouchEvent::Touch touch)
{
    return mRect.contains( globalToLocal( touch.getPos() ) );
}
Пример #3
0
bool TwoStateButton::touchEnded(ci::app::TouchEvent::Touch touch)
{
    mDownCount--;    
    return mRect.contains( globalToLocal( touch.getPos() ) );
}
Пример #4
0
bool TwoStateButton::touchBegan(ci::app::TouchEvent::Touch touch)
{
    bool inside = mRect.contains( globalToLocal( touch.getPos() ) );
    if (inside) mDownCount++;
    return inside;    
}
Пример #5
0
bool ToggleButton::touchBegan(ci::app::TouchEvent::Touch touch)
{
    return mRect.contains( globalToLocal( touch.getPos() ) );
}
Пример #6
0
bool XRect::touchEndedInternal( ci::app::TouchEvent::Touch touch )
{
	if (mScript)
		mScript->call("touchEnded", touch.getPos().x, touch.getPos().y);
    return true;
}
Пример #7
0
TouchEvent::TouchEvent(ci::app::TouchEvent::Touch event, Type type)
    : mCiEvent(event)
    , mType(type)
{
    mWindowPos = event.getPos();
}