keyboard-issue.patch

keyboard issue patch - Weeds, 2012-04-03 13:38

Download (2.4 kB)

b/cocos2dx/platform/ios/CCEGLView_ios.mm Tue Apr 03 15:12:33 2012 +0200
195
{
195
{
196
    if (bOpen)
196
    if (bOpen)
197
    {
197
    {

  
198
		[[EAGLView sharedEGLView] setAcceptFirstResponder:YES];
198
        [[EAGLView sharedEGLView] becomeFirstResponder];
199
        [[EAGLView sharedEGLView] becomeFirstResponder];

  
200
		[[EAGLView sharedEGLView] setAcceptFirstResponder:NO];
199
    }
201
    }
200
    else
202
    else
201
    {
203
    {
b/cocos2dx/platform/ios/EAGLView.h Tue Apr 03 15:12:33 2012 +0200
97
    unsigned int               indexBitsUsed;
97
    unsigned int               indexBitsUsed;
98
    NSString *              markedText_;
98
    NSString *              markedText_;
99
    CGRect                  caretRect_;
99
    CGRect                  caretRect_;

  
100
	

  
101
	BOOL					acceptFirstResponder_;
100
}
102
}
101

  
103

  
102
@property(nonatomic, readonly) UITextPosition *beginningOfDocument;
104
@property(nonatomic, readonly) UITextPosition *beginningOfDocument;
......
106
@property (nonatomic, copy) NSDictionary *markedTextStyle;
108
@property (nonatomic, copy) NSDictionary *markedTextStyle;
107
@property(readwrite, copy) UITextRange *selectedTextRange;
109
@property(readwrite, copy) UITextRange *selectedTextRange;
108
@property(nonatomic, readonly) id<UITextInputTokenizer> tokenizer;
110
@property(nonatomic, readonly) id<UITextInputTokenizer> tokenizer;

  
111
@property(nonatomic, readwrite, assign) BOOL acceptFirstResponder;
109

  
112

  
110
/** creates an initializes an EAGLView with a frame and 0-bit depth buffer, and a RGB565 color buffer */
113
/** creates an initializes an EAGLView with a frame and 0-bit depth buffer, and a RGB565 color buffer */
111
+ (id) viewWithFrame:(CGRect)frame;
114
+ (id) viewWithFrame:(CGRect)frame;
b/cocos2dx/platform/ios/EAGLView.mm Tue Apr 03 15:12:33 2012 +0200
92
@synthesize touchesIntergerDict;
92
@synthesize touchesIntergerDict;
93
@synthesize indexBitsUsed;
93
@synthesize indexBitsUsed;
94
@synthesize multiSampling=multiSampling_;
94
@synthesize multiSampling=multiSampling_;

  
95
@synthesize acceptFirstResponder=acceptFirstResponder_;
95

  
96

  
96
+ (Class) layerClass
97
+ (Class) layerClass
97
{
98
{
......
152
        indexBitsUsed = 0x00000000;
152
        indexBitsUsed = 0x00000000;
153
        
153
        
154
        view = self;
154
        view = self;

  
155
		acceptFirstResponder_ = NO;
155
	}
156
	}
156
        
157
        
157
	return self;
158
	return self;
......
530
#pragma mark -
531
#pragma mark -
531
#pragma mark UIView - Responder
532
#pragma mark UIView - Responder
532

  
533

  

  
534
- (BOOL)becomeFirstResponder {

  
535
	

  
536
	if ( acceptFirstResponder_ ) {

  
537
		return [super becomeFirstResponder];

  
538
	}

  
539
	

  
540
	return NO;

  
541
}

  
542

  
533
- (BOOL)canBecomeFirstResponder
543
- (BOOL)canBecomeFirstResponder
534
{
544
{
535
	if (nil != markedText_) {
545
	if (nil != markedText_) {