I'm programming a game using the new Sprite-Kit framework and want to use the mouse scroll wheel to change the player's gun. First of all i want to handle when the scroll wheel moves. I tried the following method, from the Cocoa Event Handling Guide
- (void)scrollWheel:(NSEvent *)theEvent
{
NSLog(@"SCROOOOOOOLL iN MOVeMENT");
}
Result: nothing, i didn't handle when i moved the mouse wheel.
Any idea of how can i handle this event ?
UPDATE: I saw two answers talking about class derivative from NSResponder or NSView but my class derives from SKScene, i'm programming using the Sprite-kit framework and obj-c doesn't allow multiple inheritance.
Here the class definition:
#import <SpriteKit/SpriteKit.h>
@interface OpcionesMenu : SKScene
@end
scrollWheel:
method? – JWWalker