added new signature for SendCommand in JGE that takes in a command string and a parameter
added native keyboard handling in iOS TODO: add same feature for Android tablets/phones
This commit is contained in:
@@ -103,6 +103,8 @@
|
||||
|
||||
[self.window setBackgroundColor: [UIColor blackColor]];
|
||||
[self.window makeKeyAndVisible];
|
||||
|
||||
return YES;
|
||||
}
|
||||
|
||||
- (void)applicationWillResignActive:(UIApplication *)application
|
||||
@@ -137,8 +139,13 @@
|
||||
[self.glViewController.view stopAnimation];
|
||||
}
|
||||
|
||||
- (void)initializeKeyboard: (id) initialState
|
||||
{
|
||||
[self.glViewController toggleKeyboardWithState: initialState];
|
||||
}
|
||||
|
||||
- (void)handleWEngineCommand:(NSString *) command
|
||||
|
||||
- (void)handleWEngineCommand:(NSString *) command withParameter: (NSString *) parameter
|
||||
{
|
||||
BOOL isDevicePhone = (UI_USER_INTERFACE_IDIOM()) == UIUserInterfaceIdiomPhone;
|
||||
|
||||
@@ -154,10 +161,13 @@
|
||||
if (isDevicePhone)
|
||||
[glViewController.eaglView removeAds];
|
||||
}
|
||||
else if ([command isEqualToString: @"displayKeyboard"])
|
||||
{
|
||||
[self initializeKeyboard: parameter];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
- (void) rotateBackgroundImage:(UIInterfaceOrientation)fromInterfaceOrientation toInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation
|
||||
{
|
||||
bool isPhone = (UI_USER_INTERFACE_IDIOM()) == UIUserInterfaceIdiomPhone;
|
||||
|
||||
Reference in New Issue
Block a user