Commit Graph

17 Commits

Author SHA1 Message Date
XiaoFeng a6a3e24fdd Fix when image size of variable button status texture are different, Helper::restrictCapInsetRect result may cause pressed & disabled status picture won't display. 2015-10-14 13:58:58 +08:00
andyque c0f40ad4a5 fix Android EditBox font size issue 2015-09-02 18:25:30 +08:00
andyque 367a105a48 refactor EditBox iOS&Android implementation
Fixed issue: https://github.com/cocos2d/cocos2d-x/issues/13616#issuecomment-135742727
2015-08-31 18:36:27 +08:00
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
Liam 56e42b0a0a update for lay out 2014-12-22 11:20:03 +08:00
andyque 16cf396ed7 refactor Button restrict capInsetSize logic and cleanup ui coding style 2014-12-16 16:44:04 +08:00
samuele3hu 529ee72432 Fix compile error triggered by UIHelper.cpp 2014-10-18 00:25:55 +08:00
Liam 3f954857a8 update for lay out 2014-10-17 19:13:37 +08:00
pipu 752eb839c7 Add protocolbuf.a 2014-10-09 18:28:09 +08:00
andyque f2b0528cc9 refactor 2014-07-30 10:45:35 +08:00
andyque e7da7b3e42 change unsigned long to size_type 2014-07-30 10:34:37 +08:00
andyque 955da5d3cc move utf8_substr to ui::helper class. 2014-07-30 10:34:37 +08:00
andyque d1df19794a fixed ui header file include problem 2014-05-22 10:49:28 +08:00
andyque da3e794631 issue #5057, convert const char* to std::string& 2014-05-12 14:59:00 +08:00
CaiWenzhi 243b7e5822 Modify layout and add Boxes 2014-03-25 17:15:54 +08:00
CaiWenzhi 2dffcb9808 Add ProtectedNode and remove "addNode" 2014-03-25 14:28:58 +08:00
andyque cbcc1bbbcf let ios project compile correct 2014-03-11 18:48:26 +08:00