Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

fixed stupid cursor selection / lozenge nonsense, made animations def…

…ault to off
  • Loading branch information...
commit 92c77723f3b26894456d0e741639373648e256fe 1 parent 8ecaac0
Kevin Bradley authored
View
21 SMFComplexDropShadowControl.mm
@@ -129,20 +129,21 @@ - (void)removeBlueLozenge //thats (sort of) the weird thing going on when you us
}
}
-- (CGRect)focusCursorFrame
-{
- //right now i am just shrinking the rect down so its only noticable during its exit animation (which was a default animation that we have nothing to do w/)
- return SHRINK_RECT;
-}
+
+//- (CGRect)focusCursorFrame
+//{
+// //right now i am just shrinking the rect down so its only noticable during its exit animation (which was a default animation that we have nothing to do w/)
+// return SHRINK_RECT;
+//}
-(void)controlWasActivated
{
[super controlWasActivated];
- NSArray *listControls = [_list controls];
- if ([listControls count] > 1)
- {
- [self removeBlueLozenge];
- }
+ //NSArray *listControls = [_list controls];
+// if ([listControls count] > 1)
+// {
+// [self removeBlueLozenge];
+// }
[self reload];
}
View
2  SMFDefines.h
@@ -32,3 +32,5 @@ typedef enum {
kBREventRemoteActionHoldUp,
kBREventRemoteActionHoldDown,
} BREventRemoteAction;
+
+#define LOG_SELF NSLog(@"%@ %s", self, _cmd)
View
47 SMFDropShadowControl.m
@@ -7,6 +7,7 @@
//
#import "SMFDropShadowControl.h"
+#import "SMFDefines.h"
@implementation SMFDropShadowControl
@@ -18,18 +19,28 @@ -(id)init
self =[super init];
if (self!=nil) {
- self.isAnimated = TRUE; //up to you, can be false by default if you dont like it
+ self.isAnimated = FALSE; //up to you, can be false by default if you dont like it
}
return self;
}
+- (CABasicAnimation *)zoomToBounds:(CGRect)theBounds //still cant get this to work properly :(
+{
+ CABasicAnimation *anim = [CABasicAnimation animationWithKeyPath:@"bounds"];
+ //anim.delegate = self; //to get the animationDidStop:finished: message
+ //anim.duration = .25;
+ anim.fromValue = [NSValue valueWithCGRect:CGRectMake(256.0,72.0,768.0,576.0)]; //
+ anim.toValue = [NSValue valueWithCGRect:theBounds];
+ return anim;
+}
+
- (CAAnimationGroup *)zoomOutFadedAnimation:(CATransform3D)zoomTransform
{
CAAnimationGroup *outAnimation = [CAAnimationGroup animation];
- [outAnimation setAnimations:[NSArray arrayWithObjects:[self zoomOutAnimation:zoomTransform], [self fadeOutAnimation], nil]];
- outAnimation.duration = .25;
+ [outAnimation setAnimations:[NSArray arrayWithObjects:[self zoomOutAnimation], [self fadeOutAnimation], nil]];
+ outAnimation.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionLinear];
outAnimation.fillMode = kCAFillModeForwards; //if you dont set this it reverts to its old mode before removing and looks really stupid.
outAnimation.removedOnCompletion = NO;
return outAnimation;
@@ -39,13 +50,13 @@ - (CAAnimationGroup *)zoomOutFadedAnimation:(CATransform3D)zoomTransform
- (CABasicAnimation *)fadeOutAnimation
{
CABasicAnimation *theAnimation =[CABasicAnimation animationWithKeyPath:@"opacity"];
- theAnimation.duration=.25;
+ //theAnimation.duration=.25;
theAnimation.fromValue=[NSNumber numberWithFloat:1.0];
theAnimation.toValue=[NSNumber numberWithFloat:0.0];
return theAnimation;
}
-- (CABasicAnimation *)zoomOutAnimation:(CATransform3D)zoomTransform
+- (CABasicAnimation *)zoomOutAnimation:(CATransform3D)zoomTransform //edits the transform directly, so this cant be properly paired with other animations
{
CABasicAnimation *zoomOutAnimation = [CABasicAnimation animationWithKeyPath:@"transform.scale"];
@@ -62,6 +73,26 @@ - (CABasicAnimation *)zoomOutAnimation:(CATransform3D)zoomTransform
}
+- (CABasicAnimation *)zoomOutAnimation
+{
+ CABasicAnimation *zoomOutAnimation = [CABasicAnimation animationWithKeyPath:@"transform.scale"];
+ zoomOutAnimation.beginTime = 0;
+ zoomOutAnimation.fromValue = [NSNumber numberWithInt:1.0];
+ zoomOutAnimation.toValue = [NSNumber numberWithInt:0.1];
+ //zoomOutAnimation.duration = 0.25f;
+ return zoomOutAnimation;
+}
+
+- (CABasicAnimation *)zoomInAnimation
+{
+ CABasicAnimation *zoomInAnimation = [CABasicAnimation animationWithKeyPath:@"transform.scale"];
+ zoomInAnimation.beginTime = 0;
+ zoomInAnimation.fromValue = [NSNumber numberWithInt:0.1];
+ zoomInAnimation.toValue = [NSNumber numberWithInt:1.0];
+ zoomInAnimation.duration = 0.25f;
+ return zoomInAnimation;
+}
+
- (CABasicAnimation *)zoomInAnimation:(CATransform3D)zoomTransform
{
@@ -74,6 +105,10 @@ - (CABasicAnimation *)zoomInAnimation:(CATransform3D)zoomTransform
}
+-(BOOL)avoidsCursor //of course it was easier than i was making it!!
+{
+ return TRUE;
+}
- (void)removeFromParent
{
@@ -101,7 +136,7 @@ -(void)addToController:(BRController *)ctrl
if (self.isAnimated == TRUE)
{
CATransform3D zoomTransform = CATransform3DMakeScale(0.1, 0.1, 1.0);
- CABasicAnimation *zoomInAnimation = [self zoomInAnimation:zoomTransform];
+ CABasicAnimation *zoomInAnimation = [self zoomInAnimation];
[zoomInAnimation setValue:@"zoomInAnimation" forKey:@"Name"];
[zoomInAnimation setDelegate:self];
[self addAnimation:zoomInAnimation forKey:@"zoomInAnimation"];
View
2  SMFListDropShadowControl.m
@@ -20,7 +20,7 @@ -(id)init
if (self!=nil) {
self.list = [[[BRListControl alloc]init]autorelease];
[self.list setDatasource:self];
- self.isAnimated = TRUE; //up to you, can be false by default if you dont like it
+ self.isAnimated = FALSE; //up to you, can be false by default if you dont like it
self.backgroundColor=[[SMFThemeInfo sharedTheme]blackColor];
self.borderColor=[[SMFThemeInfo sharedTheme] whiteColor];
self.borderWidth=3.0;
View
2  _/DEBIAN/control
@@ -1,6 +1,6 @@
Package: org.tomcool.smframework
Name: SMFramework
-Version: 0.7.7-103
+Version: 0.7.7-143
Architecture: iphoneos-arm
Description: Framework for most packages written by me
Maintainer: Thomas Cool <thomas.cool@me.com>
View
2  _/Library/Frameworks/SMFramework.framework/Headers/SMFDefines.h
@@ -32,3 +32,5 @@ typedef enum {
kBREventRemoteActionHoldUp,
kBREventRemoteActionHoldDown,
} BREventRemoteAction;
+
+#define LOG_SELF NSLog(@"%@ %s", self, _cmd)
View
BIN  _/Library/Frameworks/SMFramework.framework/SMFramework
Binary file not shown
View
2  atvTwo_Prefix.pch
@@ -8,3 +8,5 @@
#import "Backrow/AppleTV.h"
#import "SynthesizeSingleton.h"
+
+
Please sign in to comment.
Something went wrong with that request. Please try again.