projects
/
enjoyable.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Move logic into messages rather than directly in the callback functions.
[enjoyable.git]
/
TargetMouseMove.m
diff --git
a/TargetMouseMove.m
b/TargetMouseMove.m
index
893bbb6
..
8bbfd42
100644
(file)
--- a/
TargetMouseMove.m
+++ b/
TargetMouseMove.m
@@
-18,14
+18,12
@@
return YES;
}
return YES;
}
-@synthesize axis;
-
+ (NSString *)serializationCode {
return @"mmove";
}
- (NSDictionary *)serialize {
+ (NSString *)serializationCode {
return @"mmove";
}
- (NSDictionary *)serialize {
- return @{ @"type": @"mmove", @"axis": @(
self.
axis) };
+ return @{ @"type": @"mmove", @"axis": @(
_
axis) };
}
+ (Target *)targetDeserialize:(NSDictionary *)serialization
}
+ (Target *)targetDeserialize:(NSDictionary *)serialization
@@
-57,7
+55,7
@@
if ([jc frontWindowOnly])
speed = 12.f;
float dx = 0.f, dy = 0.f;
if ([jc frontWindowOnly])
speed = 12.f;
float dx = 0.f, dy = 0.f;
- if (axis == 0)
+ if (
_
axis == 0)
dx = self.magnitude * speed;
else
dy = self.magnitude * speed;
dx = self.magnitude * speed;
else
dy = self.magnitude * speed;