diff options
author | Teddy Wing | 2016-11-16 04:19:51 -0500 |
---|---|---|
committer | Teddy Wing | 2016-11-16 04:19:51 -0500 |
commit | fbea67769cdc92d6ca67b0bff3b40d0387c088cb (patch) | |
tree | 85d937d02ddd11810de9807a8b3ef98cf36a13cc | |
parent | 1832514ab872dec621d5f403eb5328167b3da033 (diff) | |
download | Low-Battery-Yup-fbea67769cdc92d6ca67b0bff3b40d0387c088cb.tar.bz2 |
Mouse: Move `centerPoint` back to `moveToCenter`
This method isn't reused anywhere so it can go back into the
`moveToCenter` method.
Originally created before `_cursor_position`. See
1832514ab872dec621d5f403eb5328167b3da033.
-rw-r--r-- | Low Battery Yup d/Mouse.h | 1 | ||||
-rw-r--r-- | Low Battery Yup d/Mouse.m | 20 |
2 files changed, 7 insertions, 14 deletions
diff --git a/Low Battery Yup d/Mouse.h b/Low Battery Yup d/Mouse.h index d34e715..fbcd43a 100644 --- a/Low Battery Yup d/Mouse.h +++ b/Low Battery Yup d/Mouse.h @@ -13,7 +13,6 @@ CGPoint _cursor_position; } -- (CGPoint)centerPoint; - (void)moveToPoint:(CGPoint)point; - (void)moveToCenter; - (void)click; diff --git a/Low Battery Yup d/Mouse.m b/Low Battery Yup d/Mouse.m index 91ddce4..bd17e44 100644 --- a/Low Battery Yup d/Mouse.m +++ b/Low Battery Yup d/Mouse.m @@ -20,7 +20,13 @@ return self; } -- (CGPoint)centerPoint +- (void)moveToPoint:(CGPoint)point +{ + _cursor_position = point; + CGDisplayMoveCursorToPoint(_current_display, point); +} + +- (void)moveToCenter { CGPoint point; @@ -30,18 +36,6 @@ point.x = width / 2; point.y = height / 2; - return point; -} - -- (void)moveToPoint:(CGPoint)point -{ - _cursor_position = point; - CGDisplayMoveCursorToPoint(_current_display, point); -} - -- (void)moveToCenter -{ - CGPoint point = [self centerPoint]; [self moveToPoint:point]; } |