Example #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;
}
Example #2
0
bool ThreeStateButton::touchEnded(ci::app::TouchEvent::Touch touch)
{
    return mRect.contains( globalToLocal( touch.getPos() ) );
}
Example #3
0
bool TwoStateButton::touchEnded(ci::app::TouchEvent::Touch touch)
{
    mDownCount--;    
    return mRect.contains( globalToLocal( touch.getPos() ) );
}
Example #4
0
bool TwoStateButton::touchBegan(ci::app::TouchEvent::Touch touch)
{
    bool inside = mRect.contains( globalToLocal( touch.getPos() ) );
    if (inside) mDownCount++;
    return inside;    
}
Example #5
0
bool ToggleButton::touchBegan(ci::app::TouchEvent::Touch touch)
{
    return mRect.contains( globalToLocal( touch.getPos() ) );
}
Example #6
0
bool XRect::touchEndedInternal( ci::app::TouchEvent::Touch touch )
{
	if (mScript)
		mScript->call("touchEnded", touch.getPos().x, touch.getPos().y);
    return true;
}
Example #7
0
TouchEvent::TouchEvent(ci::app::TouchEvent::Touch event, Type type)
    : mCiEvent(event)
    , mType(type)
{
    mWindowPos = event.getPos();
}