示例#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();
}