Added simple hud overlay on double-click actions

This commit is contained in:
michael starke
2013-03-03 04:46:25 +01:00
parent 72bf306a3c
commit 7d6712536b
9 changed files with 773 additions and 15 deletions

29
MacPass/MPOverlayView.m Normal file
View File

@@ -0,0 +1,29 @@
//
// MPOverlayView.m
// MacPass
//
// Created by Michael Starke on 03.03.13.
// Copyright (c) 2013 HicknHack Software GmbH. All rights reserved.
//
#import "MPOverlayView.h"
@implementation MPOverlayView
- (void)drawRect:(NSRect)dirtyRect {
[[NSGraphicsContext currentContext] saveGraphicsState];
[[NSColor clearColor] set];
NSRectFill([self bounds]);
NSColor *backgroundColor = [NSColor colorWithCalibratedWhite:0 alpha:0.7];
NSBezierPath *path = [NSBezierPath bezierPathWithRoundedRect:[self bounds] xRadius:10 yRadius:10];
[backgroundColor set];
[path fill];
[[NSGraphicsContext currentContext] restoreGraphicsState];
}
- (BOOL)isOpaque {
return NO;
}
@end