ios stuff

This commit is contained in:
vladislav.khorev committed 2013-07-29 18:01:22 +00:00
1 parent 9a27aacbab
commit c20fd99897
3 files changed
+16 -2

No files matched your search

+3 -2
View File
@@ -78,8 +78,9 @@ void GuiManagerSetKeyboardText(std::string newText); //Find it in GUIManager.cpp
void SetKeyboardText(const char* newText)
{
GuiManagerSetKeyboardText(newText);
NSLog(@"text: %s", newText);
SE::PerformInMainThreadAsync(boost::bind(&GuiManagerSetKeyboardText, newText));
//GuiManagerSetKeyboardText(newText);
//NSLog(@"text: %s", newText);
}
} //namespace SE
@@ -71,6 +71,10 @@ void SetKeyboardText(const char* newText);
_hiddenTextField = [[UITextField alloc] initWithFrame:CGRectMake(-200,-200,0,0)];
//[_hiddenTextField setReturnKeyType: UIReturnKeyDone];
_hiddenTextField.autocorrectionType = UITextAutocorrectionTypeNo;
[self.view addSubview:_hiddenTextField];
extKeyboardTextView = _hiddenTextField;
@@ -145,6 +149,12 @@ void SetKeyboardText(const char* newText);
NSLog(@"End");
}
- (BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string
{
if([string isEqualToString:@"\n"])
[textField resignFirstResponder];
return YES;
}
#pragma mark - GLKView and GLKViewController delegate methods