cog/Window/VolumeButton.m

37 lines
719 B
Matlab
Raw Normal View History

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"
#import "PlaybackController.h"
2009-02-09 05:53:38 +00:00
@implementation VolumeButton
- (void)scrollWheel:(NSEvent *)theEvent
{
double change = [theEvent deltaY];
[(VolumeSlider *)_popView setDoubleValue:[(VolumeSlider *)_popView doubleValue] + change];
[[(VolumeSlider *)_popView target] changeVolume:_popView];
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