mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-09-09 04:48:14 +00:00
Hide the mouse cursor appropriately on iOS
This commit is contained in:
@@ -37,6 +37,7 @@
|
|||||||
|
|
||||||
#if !TARGET_OS_TV && defined(__IPHONE_13_4)
|
#if !TARGET_OS_TV && defined(__IPHONE_13_4)
|
||||||
- (UIPointerRegion *)pointerInteraction:(UIPointerInteraction *)interaction regionForRequest:(UIPointerRegionRequest *)request defaultRegion:(UIPointerRegion *)defaultRegion API_AVAILABLE(ios(13.4));
|
- (UIPointerRegion *)pointerInteraction:(UIPointerInteraction *)interaction regionForRequest:(UIPointerRegionRequest *)request defaultRegion:(UIPointerRegion *)defaultRegion API_AVAILABLE(ios(13.4));
|
||||||
|
- (UIPointerStyle *)pointerInteraction:(UIPointerInteraction *)interaction styleForRegion:(UIPointerRegion *)region API_AVAILABLE(ios(13.4));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
- (CGPoint)touchLocation:(UITouch *)touch shouldNormalize:(BOOL)normalize;
|
- (CGPoint)touchLocation:(UITouch *)touch shouldNormalize:(BOOL)normalize;
|
||||||
|
@@ -155,6 +155,14 @@ extern int SDL_AppleTVRemoteOpenedAsJoystick;
|
|||||||
}
|
}
|
||||||
return [UIPointerRegion regionWithRect:self.bounds identifier:nil];
|
return [UIPointerRegion regionWithRect:self.bounds identifier:nil];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (UIPointerStyle *)pointerInteraction:(UIPointerInteraction *)interaction styleForRegion:(UIPointerRegion *)region API_AVAILABLE(ios(13.4)){
|
||||||
|
if (SDL_ShowCursor(-1)) {
|
||||||
|
return nil;
|
||||||
|
} else {
|
||||||
|
return [UIPointerStyle hiddenPointerStyle];
|
||||||
|
}
|
||||||
|
}
|
||||||
#endif /* !TARGET_OS_TV && __IPHONE_13_4 */
|
#endif /* !TARGET_OS_TV && __IPHONE_13_4 */
|
||||||
|
|
||||||
- (SDL_TouchDeviceType)touchTypeForTouch:(UITouch *)touch
|
- (SDL_TouchDeviceType)touchTypeForTouch:(UITouch *)touch
|
||||||
|
Reference in New Issue
Block a user