Commit Graph

10 Commits

Author SHA1 Message Date
andyque a35e89225e Re-implement Editbox on Android platform.
This PR also fixed issue:

https://github.com/cocos2d/cocos2d-x/issues/9572

For the new EditBox:

1. Added a ResizeLayout for updating layout when soft keyboard is shown.
This is because some Android devices won't refresh the view and when
the view is panned, the native EditText will turn black. This is really
a hack, but it works for many Android devices from 2.3 to 5.0.

When keyboard is beginning to show, the ResizeLayout's doLayout
method will be called 24 frames per second. Once the keyboard is closed,
or the user begins to input, the doLayout method will be disabled.

2. EditText is working in a different UI thread, so all the data
are passed to GL thread via callbacks in UI thead.

3. It also overrides onKeyDown method in Cocos2dxEditBox.
When the EditText got the focus, users could press back key to exit
the game. This behavior is not allowed. We give developer the choice to
handle back key event manually.
2015-08-07 17:27:15 +08:00
Mazyad Alabduljaleel fa284bc2db headers and whitespace 2015-07-17 18:05:42 +03:00
Mazyad Alabduljaleel 32c5be84b8 weird, how did this slip 2015-07-17 17:15:41 +03:00
Mazyad Alabduljaleel d8b7b1d565 Mac EditBox cleanup:
+ Reduce header clutter
+ consistent property access and overall code style
+ cleanup extra code
2015-07-17 17:12:09 +03:00
minggo 1916bc1f1f Merge pull request #10693 from Mazyod/editbox-text-alpha-support
Support Color4B for editbox text
2015-03-16 14:52:36 +08:00
Mazyad Alabduljaleel 9d5fdcb973 Support Color4B for editbox text 2015-03-02 15:31:59 +04:00
Mazyad Alabduljaleel 4387844176 Fix editbox on Mac 2015-03-01 23:56:18 +04:00
andyque 2013cdb4ef fix setMaxLength issue of EditBox-mac 2014-10-10 15:26:33 +08:00
Sergey Perepelitsa 0a46a83794 fix missing includes 2014-09-23 23:19:25 +04:00
Ricardo Quesada 9082ca18c3 Platform fixed 2014-09-09 16:50:02 -07:00