From fbea67769cdc92d6ca67b0bff3b40d0387c088cb Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Wed, 16 Nov 2016 04:19:51 -0500 Subject: 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. --- Low Battery Yup d/Mouse.h | 1 - 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]; } -- cgit v1.2.3