2009-02-09 05:53:38 +00:00
|
|
|
//
|
|
|
|
// VolumeButton.m
|
|
|
|
// Cog
|
|
|
|
//
|
|
|
|
// Created by Vincent Spader on 2/8/09.
|
|
|
|
// Copyright 2009 __MyCompanyName__. All rights reserved.
|
|
|
|
//
|
|
|
|
|
|
|
|
#import "VolumeButton.h"
|
|
|
|
#import "VolumeSlider.h"
|
2009-02-09 16:09:29 +00:00
|
|
|
#import "PlaybackController.h"
|
2009-02-09 05:53:38 +00:00
|
|
|
|
|
|
|
@implementation VolumeButton
|
|
|
|
|
|
|
|
- (void)scrollWheel:(NSEvent *)theEvent
|
|
|
|
{
|
2009-02-09 06:04:27 +00:00
|
|
|
double change = [theEvent deltaY];
|
|
|
|
|
|
|
|
[(VolumeSlider *)_popView setDoubleValue:[(VolumeSlider *)_popView doubleValue] + change];
|
|
|
|
|
2009-02-09 16:09:29 +00:00
|
|
|
[[(VolumeSlider *)_popView target] changeVolume:_popView];
|
2009-02-09 06:04:27 +00:00
|
|
|
|
2021-01-07 03:48:40 +00:00
|
|
|
[(VolumeSlider *)_popView showToolTipForView:self closeAfter:1.0];
|
2009-02-09 05:53:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
- (void)mouseDown:(NSEvent *)theEvent
|
|
|
|
{
|
|
|
|
[(VolumeSlider *)_popView hideToolTip];
|
|
|
|
|
|
|
|
[super mouseDown:theEvent];
|
|
|
|
|
|
|
|
[(VolumeSlider *)_popView hideToolTip];
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@end
|