prepare to add touch callbacks
This commit is contained in:
parent
cae863af45
commit
29006070f4
|
|
@ -60,6 +60,11 @@ extern void ios_destroy();
|
||||||
/* GameViewController */
|
/* GameViewController */
|
||||||
@interface GameViewController : UIViewController
|
@interface GameViewController : UIViewController
|
||||||
- (void)update;
|
- (void)update;
|
||||||
|
- (void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event;
|
||||||
|
- (void)touchesEnded:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event;
|
||||||
|
- (void)touchesMoved:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event;
|
||||||
|
- (void)touchesCancelled:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event;
|
||||||
|
- (void)touchesEstimatedPropertiesUpdated:(NSSet<UITouch *> *)touches;
|
||||||
@end
|
@end
|
||||||
|
|
||||||
/* AppDelegate */
|
/* AppDelegate */
|
||||||
|
|
@ -71,7 +76,6 @@ extern void ios_destroy();
|
||||||
// Types and Structures Definition
|
// Types and Structures Definition
|
||||||
//----------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------
|
||||||
typedef struct {
|
typedef struct {
|
||||||
// TODO: Define the platform specific variables required
|
|
||||||
GameViewController *viewController; // Root view controller
|
GameViewController *viewController; // Root view controller
|
||||||
|
|
||||||
// Display data
|
// Display data
|
||||||
|
|
@ -92,7 +96,6 @@ static PlatformData platform = { 0 }; // Platform specific data
|
||||||
// Module Internal Functions Declaration
|
// Module Internal Functions Declaration
|
||||||
//----------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------
|
||||||
int InitPlatform(void); // Initialize platform (graphics, inputs and more)
|
int InitPlatform(void); // Initialize platform (graphics, inputs and more)
|
||||||
bool InitGraphicsDevice(void); // Initialize graphics device
|
|
||||||
|
|
||||||
//----------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------
|
||||||
// Module Functions Declaration
|
// Module Functions Declaration
|
||||||
|
|
@ -442,6 +445,8 @@ void PollInputEvents(void)
|
||||||
|
|
||||||
// TODO: Poll input events for iOS
|
// TODO: Poll input events for iOS
|
||||||
|
|
||||||
|
// Register touch points count
|
||||||
|
// https://developer.apple.com/documentation/uikit/touches_presses_and_gestures
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -645,6 +650,7 @@ void ClosePlatform(void)
|
||||||
[super viewDidLoad];
|
[super viewDidLoad];
|
||||||
// self.modalPresentationCapturesStatusBarAppearance = true;
|
// self.modalPresentationCapturesStatusBarAppearance = true;
|
||||||
platform.viewController = self;
|
platform.viewController = self;
|
||||||
|
self.view.multipleTouchEnabled = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)update
|
- (void)update
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user