Reverting to previous CPControl/CPSlider event system

This commit is contained in:
Tom Robinson committed 2008-10-28 00:56:21 -07:00
1 parent a3ae869f1d
commit e8febcda15
2 files changed
+11 -19

No files matched your search

-16
View File
@@ -262,22 +262,6 @@ var CPControlBlackColor = [CPColor blackColor];
[super mouseUp:anEvent];
}
- (void)mouseDown:(CPEvent)anEvent
{
if (_sendActionOn & CPLeftMouseDownMask && CPRectContainsPoint([self bounds], [self convertPoint:[anEvent locationInWindow] fromView:nil]))
[self sendAction:_action to:_target];
[super mouseDown:anEvent];
}
- (void)mouseDragged:(CPEvent)anEvent
{
if (_sendActionOn & CPLeftMouseDraggedMask && CPRectContainsPoint([self bounds], [self convertPoint:[anEvent locationInWindow] fromView:nil]))
[self sendAction:_action to:_target];
[super mouseDragged:anEvent];
}
/*!
Causes <code>anAction</code> to be sent to <code>anObject</code>.
@param anAction the action to send