Neo Kim
603d788fbf
PageView - Fix that page indicator was not working well in vertical page view.
2015-11-15 22:49:42 +09:00
Neo Kim
b0ae23d567
PageView - Add more comments
2015-11-15 22:49:42 +09:00
Neo Kim
ad134a6363
PageView - Fix that the indicator's direction is not appropriate when `PageView::setDirection()` is called before `PageView::setIndicatorEnabled(true)`.
2015-11-15 22:49:42 +09:00
Neo Kim
94637bef2f
PageView - Change to keep some of the original API names because it makes more sense.
2015-11-10 21:35:01 +09:00
Neo Kim
9cbbd283c7
PageView - Deprecate the APIs related to custom scroll threshold.
2015-11-10 21:35:01 +09:00
Neo Kim
049607b5d8
Replace tab indents to 4 spaces.
2015-11-10 21:03:51 +09:00
Jeff Wang
c1a64e9243
new implementation of EditBoxImpl-win32
2015-11-06 02:14:34 +08:00
mogemimi
a31cce9a80
Fix minor grammar and typo in documentation
2015-11-04 17:14:00 +09:00
zilongshanren
3e2094981f
add scale9sprite rendering type test
2015-10-30 14:01:01 +08:00
zilongshanren
f84c2de1e2
add sprite and scale9sprite batch test
2015-10-30 09:58:02 +08:00
zilongshanren
1417534194
add rendering type to scale9sprite
2015-10-29 23:13:36 +08:00
zilongshanren
7c82f9fe88
cache slice sprite calculation
2015-10-29 21:53:58 +08:00
zilongshanren
9a14ad5b14
fix a small bug related to non slice anchorPoint
2015-10-29 14:27:27 +08:00
zilongshanren
ccf4cb5a74
improve scale9sprite
2015-10-29 10:41:58 +08:00
Neo Kim
e59b7b74be
PageView - Add `scrollToItem()` having only one parameter.
2015-10-28 16:57:54 +09:00
Neo Kim
69b794d284
PageView - Remove `_indicatorEnabled` flag. Null `_indicator` means that it is disabled.
2015-10-28 16:57:53 +09:00
Neo Kim
9ed617c978
PageView - Add API descriptions
2015-10-28 16:56:36 +09:00
Neo Kim
b72e4118f0
PageViewIndicator - Add `PageViewIndicator.cpp` to build configuration files.
2015-10-28 16:56:36 +09:00
Neo Kim
e3fcd6722a
PageViewIndicator - Add some getter and setters.
2015-10-28 16:56:36 +09:00
Neo Kim
8abd1ab600
PageView - The indicator should be created before `ListView::init()`
2015-10-28 16:56:36 +09:00
Neo Kim
2d2d17172c
PageViewIndicator - Fix that indexes were upside down in vertical view.
2015-10-28 16:56:36 +09:00
Neo Kim
1897051664
PageView - Add `setDirection()` and `setIndicatorEnabled()` methods.
2015-10-28 16:56:36 +09:00
Neo Kim
eefdffc032
PageViewIndicator - Add `setDirection()` method.
2015-10-28 16:56:36 +09:00
Neo Kim
368a3048c4
PageView - Add `setIndicatorPosition()`.
2015-10-28 16:56:36 +09:00
Neo Kim
fc0fe976f7
PageView - Complete `handleReleaseLogic()` method.
2015-10-28 16:56:36 +09:00
Neo Kim
b19ed5a3b5
ScrollView - Change `moveInnerContainer()` to virtual method.
2015-10-28 16:56:36 +09:00
Neo Kim
b3f33de071
ListView - Change `calculateItemDestination()` to a class method.
2015-10-28 16:56:35 +09:00
Neo Kim
c684016ee6
PageView - Implementing page view indicator
2015-10-28 16:56:35 +09:00
Neo Kim
4dbfb79110
Add `onItemListChanged()`method.
2015-10-28 16:56:35 +09:00
Neo Kim
0ee09fcfce
PageView - Implement the page indicator
2015-10-28 16:56:35 +09:00
Neo Kim
30e2e46f20
PageView - Add `PageViewIndicator` which indicates current page among total pages.
2015-10-28 16:56:35 +09:00
Neo Kim
76acb91861
Move `createSpriteFromBase64()` from `UIScrollViewBar.cpp` to `ccUtils.h` in order to use it in other places.
2015-10-28 16:56:35 +09:00
Neo Kim
a2bc0d4859
ScrollViewBar - Change wording in comment.
2015-10-28 16:56:35 +09:00
Neo Kim
b9a4449494
PageView - Add `handleReleaseLogic()` for page view.
2015-10-28 16:56:35 +09:00
Neo Kim
46c0a43105
ScrollView - Use a vector in `scrollChildren()` instead of two floats.
2015-10-28 16:56:35 +09:00
Neo Kim
84d0625b93
ScrollView - Remove redundant codes.
2015-10-28 16:56:34 +09:00
Neo Kim
5de6aa78ec
ScrollView - Remove the return value of `scrollChildren()`.
2015-10-28 16:56:34 +09:00
Neo Kim
30d39af5fa
Refactor `jumpTo` methods to use `moveInnerContainer()`.
2015-10-28 16:56:34 +09:00
Neo Kim
e67250e162
ScrollView - Create `moveInnerContainer()` to replace `moveChildren()` and `moveChildrenToPosition()`. All move related logic will be integrated into one.
2015-10-28 16:56:34 +09:00
Neo Kim
97acf52cc8
PageView - Replace the legacy methods of `PageView` with the ones of `ListView`.
2015-10-28 16:56:34 +09:00
Neo Kim
e567259826
PageView - Change `PageView` to derive from `ListView` and use `ScrollView::Direction` instead of `PageView::Direction`.
2015-10-28 16:56:34 +09:00
mogemimi
9df30d2454
Fix typos in documentation
2015-10-23 16:59:51 +09:00
dimon4eg
27d5ad920e
Update comment
2015-10-21 16:55:45 +03:00
dimon4eg
82bcbb0325
Revert: Fix crash in web view on android
2015-10-21 16:54:41 +03:00
dimon4eg
d317cd75e1
Improved code a bit
2015-10-16 11:28:34 +03:00
dimon4eg
ee3c000b43
Fix crash in web view on android
2015-10-15 16:43:53 +03:00
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
mogemimi
daa29752db
Fix typo in UIEditBox
2015-10-12 13:57:50 +09:00
pandamicro
c2571f950c
Merge pull request #14003 from zilongshanren/fixWebViewCallback
...
fix ui::WebView callback operate OpenGL issue.
2015-10-10 11:32:02 +08:00
pandamicro
27fc6b24ee
Merge pull request #14080 from 1scaR1/v3
...
Fixed enabling of scale9 background in ccui.Layout
2015-10-10 09:39:09 +08:00
mogemimi
5993304e06
Fix typos
2015-10-09 17:59:11 +09:00
子龙山人
cdf6fa8a54
Merge pull request #14052 from neokim/fix_listview_center_magnetic_issue
...
Fix an issue that list view's Magnetic::CENTER is not working well when non-bounceable.
2015-10-09 08:27:18 +08:00
pandamicro
e32e8b95a4
Merge pull request #14055 from Dimon4eg/fix-crash-in-LoadingBar
...
fix crash in LoadingBar
2015-10-08 11:22:43 +08:00
Nikita
0042f9f5cd
Fixed background size if scale9 enabled in Layout
...
Fixes for issue: cocos2d#14001
2015-10-06 16:14:47 +03:00
pandamicro
1e298a2c1a
Merge pull request #14064 from MSOpenTech/v3-win10-fix
...
V3: fixed Windows 10 UWP app manifest by correcting image asset paths
2015-10-04 10:53:52 +08:00
Dale Stammen
32eeb560c3
clean up include files for WINRT platforms
2015-10-02 18:49:41 -07:00
mogemimi
9f768bc1ab
Add missing override keyword
2015-10-02 18:18:23 +09:00
dimon4eg
ec20b48775
fix crash in LoadingBar
2015-09-30 13:04:13 +03:00
dimon4eg
fe8c1a12b5
Fix for text field
2015-09-30 12:39:44 +03:00
dimon4eg
2785a4313f
Set focus for widgets
2015-09-30 12:31:33 +03:00
Neo Kim
423cbb83a9
Fix an issue that list view's Magnetic::CENTER is not working well around boundaries if it is non-bounceable.
2015-09-30 16:55:48 +09:00
Yukio Murakami
bc4bd99863
Support the new line element. Fixed a problem that protrude from the drawing area.
2015-09-28 14:47:09 +09:00
zilongshanren
bee52e378d
fix ui::WebView callback operate OpenGL issue.
...
All the OpenGL operations should be in OpenGL thread.
This PR wraps the callbacks in OpenGL thread.
2015-09-23 11:22:36 +08:00
XiaoFeng
f5c88c32af
Fix click slider bar but not drag ball, after slider position changed won't send percentChangedEvent
2015-09-23 10:55:01 +08:00
pandamicro
eec67ea13b
Merge pull request #13975 from zilongshanren/fixIssue11259
...
don't change Text's dimension when label scale.
2015-09-22 01:49:20 +08:00
子龙山人
f2190c79b9
Merge pull request #13835 from neokim/add_jump_to_item_to_listview
...
Add a feature of jumping to a specific item in list tview
2015-09-21 18:36:05 +08:00
zilongshanren
fd8cfd8ccb
don't change Text's dimension when label scale.
...
Fixed issue: https://github.com/cocos2d/cocos2d-x/issues/11259
2015-09-21 17:03:29 +08:00
Neo Kim
b09a0bd0e3
Add a missing parameter in comment for document.
2015-09-21 17:07:32 +09:00
hanxi
b1ed1a8a51
add UIEditBox support linux platform.
2015-09-18 17:11:58 +08:00
pandamicro
1eeafed072
Merge pull request #13884 from yangws/v3
...
Fix bug: in Widget::isClippingParentContainsPoint, _hittedByCamera may be null.
2015-09-17 16:32:56 +08:00
Vincent Yang
4b83240bed
Fix bug: in ui::Widget::isClippingParentContainsPoint, _hittedByCamera may be null.
2015-09-17 11:20:36 +08:00
andyque
1be5402050
Merge branch 'v3' into addiOSMultiline-support
...
# Conflicts:
# build/cocos2d_libs.xcodeproj/project.pbxproj
2015-09-16 21:49:55 +08:00
Neo Kim
d9be26cd98
Use another dirty flag for list view layout other than 'Layout::_doLayoutDirty' because 'Layout::onEnter()' forces '_doLayoutDirty' to be true always. List view should have a way not to do layout in 'onEnter()'.
2015-09-16 16:21:11 +09:00
Mazyad Alabduljaleel
3090599f83
Oops, committed duplicate code by mistake
2015-09-16 10:12:07 +03:00
Mazyad Alabduljaleel
61980d1a8b
[refactor] Break down the file into separate files, because it exceeded 1 kLOC 🙀
...
[refactor] Consolidate `UITextView` and `UITextField` APIs.
[refactor] rename classes that start with `UI` to `CCUI`, since that prefix is reserved by Apple.
[bugfix] setting the placeholder for `CCUISingleLineTextField` was missing in `createSingleLineTextField`
[bugfix] In `MultiLineTextView`, if `placeholder` changed, there doesn't seem to be a deterministic way of updating the `placeholderLabel`. We are relying on `drawRect:`. Instead, `placeholder` is now a computed property on top of `placeholderLabel.text`.
[bugfix] If the user wants multi-line secure input, we should set it, since it is possible, right?
[minor] `[viewWithTag:999]` was used instead of calling the property itself.
[minor] `drawRect:` was used to load properties, when it is normally in the getter.
[minor] fix ObjC code style
2015-09-15 23:36:26 +03:00
Neo Kim
11d80f47f8
Refactor list view's layout refreshing logic.
2015-09-15 22:34:00 +09:00
Neo Kim
f58cbad6c2
Add 'jumpToItem()' to list view.
2015-09-15 22:33:50 +09:00
子龙山人
f2bee23696
Merge pull request #13789 from neokim/fix-13668
...
Fix for #13668
2015-09-15 18:28:24 +08:00
子龙山人
f5848290a2
Merge pull request #13673 from Almax27/patch-3
...
Removed ScrollView::_innerContainer pointer copy
2015-09-15 17:42:20 +08:00
andyque
fe5a43c428
Enable tapping Slider bar to scroll
...
Fixed issue: https://github.com/cocos2d/cocos2d-x/issues/13434
2015-09-15 14:13:52 +08:00
andyque
556175df1e
add iOS EditBox multiline support
...
When the inputMode is ANY, then we use TextView to input.
otherwise we use normal UITextField.
Fixed issue https://github.com/cocos2d/cocos2d-x/issues/13436
2015-09-15 13:52:39 +08:00
andyque
2fea4db9fc
fix ui::Button title location issue
2015-09-15 13:37:32 +08:00
子龙山人
1d7d283ee6
Merge pull request #13549 from neokim/add_getters_for_renderers_into_button
...
Add getters for the internal renderer instances of Button
2015-09-15 09:26:34 +08:00
Neo Kim
c224a81497
Rectify typos
2015-09-14 15:27:51 +09:00
Neo Kim
3fff195c20
Override 'jumpToSomewhere' functions in list view to recalculate inner container's size if necessary.
2015-09-13 22:32:22 +09:00
Neo Kim
7f9c8acc2a
ScrollView - Add a guard statement in setContentSize() to avoid resetting inner container's position if not necessary.
2015-09-13 21:43:34 +09:00
Neo Kim
f39644d129
Remove default arguments in APIs and rename the parameter 'time' to 'timeInSec'.
2015-09-11 16:00:53 +09:00
Neo Kim
586af44fe6
ListView - Add getter / setter for magnetic out of boundary flag.
2015-09-09 10:29:19 +09:00
Neo Kim
b28b8146e7
ListView - Add the logic for magnetic bounce back.
2015-09-09 10:29:19 +09:00
Neo Kim
3085e1385c
ListView - Add 'startMagnetScroll()' for non-inertia scroll.
2015-09-09 10:29:18 +09:00
Neo Kim
e58c073186
ListView - Apply magnetic to inertia scroll.
2015-09-09 10:29:18 +09:00
Neo Kim
ca3ea53ffd
ListView - Add enum for magnetic type and test cases for magnetic scroll.
2015-09-09 10:29:18 +09:00
Neo Kim
d8fc04d109
ListView - Add 'scrollToItem' method and its test cases.
2015-09-09 10:29:18 +09:00
Neo Kim
2599271410
ListView - Add APIs which return the closest item in specific position in current view.
2015-09-09 10:29:17 +09:00
Neo Kim
a4e5f7c0a8
ScrollView - Refactor the logic about getting out of boundary amount.
2015-09-09 10:28:47 +09:00
Neo Kim
90891f9efb
ScrollView - Add a utility function 'flattenVectorByDirection()'
2015-09-09 10:28:46 +09:00
Neo Kim
ea79d92aa1
ScrollView - Fix an issue which occurs when auto scroll is started during already bouncing back.
2015-09-09 10:28:46 +09:00
Neo Kim
7394b3f467
ScrollView - Rename 'startAutoScrollChildrenWithDestination()' to 'startAutoScrollToDestination' and 'duration' to 'time'.
2015-09-09 10:28:46 +09:00
Neo Kim
c037769e62
ScrollView - Correct auto scroll direction
2015-09-09 10:28:45 +09:00
Neo Kim
2dec85e175
ScrollView - Fix that the last touch when release was not considered for inertia scroll
2015-09-09 10:28:45 +09:00
Neo Kim
5f469264fc
ScrollView - Refactor auto scroll for simpler implementation
...
- Remove auto scroll callback
2015-09-09 10:28:45 +09:00
Neo Kim
ad01bc7699
ScrollView - Add startAttenuatingAutoScroll()
2015-09-09 10:28:44 +09:00
Neo Kim
3cff03e8ed
ScrollView - Remove movement callback from auto scroll.
2015-09-09 10:28:44 +09:00
Neo Kim
0c4414625a
ScrollView - Rectify wrong indentations
2015-09-09 10:28:44 +09:00
子龙山人
75882e64a0
Merge pull request #13646 from neokim/refactor_scrollview_inertia_scroll
...
Refactor scroll view's inertia scroll
2015-09-07 22:38:20 +08:00
pandamicro
4fb34ba190
Merge pull request #13703 from cocos2d/v3.8
...
Sync v3.8 to v3
2015-09-07 14:56:37 +08:00
Aaron
59fab25804
Removed innerContainer pointer copy when cloning
...
Copied pointer becomes invalid when model widget destructs. Instead we simply copy the position.
2015-09-03 11:29:58 +01:00
andyque
c0f40ad4a5
fix Android EditBox font size issue
2015-09-02 18:25:30 +08:00
Neo Kim
3656ce99bd
Fix an issue regarding non-bouncing scroll view
2015-09-01 15:13:18 +09:00
Neo Kim
129f4b3186
Implement the inertia scroll using auto scroll feature. Consolidate them into one.
2015-09-01 11:52:05 +09:00
Neo Kim
ecd947d9f4
Change auto scroll feature to receive callbacks to remove dependencies.
2015-09-01 11:45:42 +09:00
Neo Kim
137a05a2aa
Rectify the wrong indentations in switch statements
2015-09-01 11:45:42 +09:00
Neo Kim
69d23eb00c
Extract the touch move speed calculation logic from inertia concept.
2015-09-01 11:45:42 +09:00
Neo Kim
81795f6d73
Add a guard statement in setInnerContainerPosition().
2015-09-01 11:45:42 +09:00
Neo Kim
96a78f687c
Remove redundant codes
2015-09-01 11:45:42 +09:00
子龙山人
2e9e660cbb
Merge pull request #13220 from zilongshanren/testEditBoxWin32
...
Improved EditBox implement for platform win32
2015-09-01 10:40:11 +08:00
Jeff Wang
b8105349c7
revert to the original state when user cancel input
2015-09-01 00:06:18 +08:00
WenhaiLin
a3b5becb45
Sync v3.8 to v3
2015-08-31 22:05:37 +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
40492e6169
fix Slider create missing res type.
...
fixed https://github.com/cocos2d/cocos2d-x/issues/13575
2015-08-27 23:34:39 +08:00
pandamicro
d6045fdbea
Merge branch 'v3.8' of github.com:cocos2d/cocos2d-x into v3
...
Conflicts:
cocos/audio/winrt/Audio.cpp
cocos/platform/winrt/CCCommon.cpp
cocos/platform/winrt/CCWinRTUtils.cpp
cocos/platform/winrt/CCWinRTUtils.h
2015-08-27 10:40:04 +08:00
andyque
7f73415189
fix Scale9Sprite draw extra pixels in spritesheet
...
Fixed https://github.com/cocos2d/cocos2d-x/issues/13564
2015-08-26 16:15:00 +08:00
andyque
6cea66f932
fixed Scale9Sprite default capInset bug.
...
Fixed https://github.com/cocos2d/cocos2d-x/issues/13560
2015-08-25 23:31:34 +08:00
子龙山人
734388d2bd
Merge pull request #13556 from zilongshanren/fix-listview-intial-position
...
fix ListView innerContainer initial position error
2015-08-25 16:50:02 +08:00
andyque
65b78d4a49
fix ListView innerContainer initial position error
2015-08-25 15:15:18 +08:00
Neo Kim
ab85406bc8
Added version comments
2015-08-25 11:21:26 +09:00
Neo Kim
d2fb1bda7d
Add getters for the internal renderer instances
2015-08-25 11:21:02 +09:00
子龙山人
b0561749bd
Merge pull request #13537 from neokim/fix_issue_13516
...
Fix issue 13516
2015-08-25 10:01:03 +08:00
Neo Kim
edd9fecf39
Update scroll bar when the inner container's size changes
2015-08-24 18:47:12 +09:00
Neo Kim
9f693ef8f3
Enhance readability
2015-08-24 18:46:43 +09:00
Neo Kim
e1ed3ecb09
Add a method to change selected radio button without event dispatch.
2015-08-24 17:39:49 +09:00
Neo Kim
887efdca1b
Add 'removeAllRadioButtons()'
2015-08-24 17:39:48 +09:00
Neo Kim
202b549073
Add getters for the internal renderer instances
2015-08-24 17:39:47 +09:00
Neo Kim
da85b16292
Change not to dispatch event when add radio buttons
2015-08-24 17:39:46 +09:00
andyque
29f97d63ed
fix scrollview innerContainer initial position.
2015-08-21 11:56:19 +08:00
Vladimir Perminov
24d06bb1c9
More use StringUtf8ToWideChar and PlatformStringFromString
2015-08-17 23:04:05 +03:00
andyque
d45897ec53
fix RadioButton disallow selection issue.
2015-08-14 18:07:13 +08:00
andyque
f9385d1604
fix iOS EditBox Chinese input maxLength issue.
...
https://github.com/cocos2d/cocos2d-x/issues/12519
2015-08-13 15:01:14 +08:00
andyque
68a90743c7
Sync PR: https://github.com/cocos2d/cocos2d-x/pull/13303
2015-08-12 18:09:32 +08:00
andyque
82f597ce98
Merge branch 'v3.7.1' into v3
...
# Conflicts:
# cocos/scripting/lua-bindings/auto/api/CheckBox.lua
# cocos/ui/UICheckBox.cpp
# cocos/ui/UICheckBox.h
2015-08-12 17:59:50 +08:00
andyque
763976d50c
fix ui::TextField status error.
...
1. Refactoring Cocos2dxEditText to reuse Cocos2dxEditBox.
2. Reorder the event handling in ui::TextField.
2015-08-12 11:05:07 +08:00
pandamicro
6bcea5baee
Fix issue described in #13284 by reorder state setting and event dispatching
...
The real reason of #13284 is that the `_selected` state is set after touch events dispatching.
So I decided to override `onTouchEnded` function to set the `_selected` state.
2015-08-10 22:27:59 +08:00
pandamicro
c54a204bad
Synchronize enable state and bright state for Widget
...
Fix issue: https://github.com/cocos2d/cocos2d-x/issues/8137
2015-08-10 07:42:35 +08:00
pandamicro
1f52f0971a
Fix CheckBox cross renderer state not updated correctly
...
Issue description: When checkbox checked, its renderer adaptation may not be updated.
Reported http://punchbox.info:3000/issues/21630
2015-08-09 20:57:37 +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
andyque
211dde38e9
Fix improper touch intercept event propagation.
...
When the container widget is disabled, it shouldn't intercept touch.
https://github.com/cocos2d/cocos2d-x/issues/8316
2015-08-06 22:50:53 +08:00
Jeff Wang
bbf7e994e7
Improved EditBox implement for platform win32
2015-08-05 17:33:54 +08:00
andyque
2427c15b60
modify vertical scroll direction
2015-08-03 11:38:23 +08:00
andyque
63822566d2
refactor PageView implementation
2015-08-01 23:33:25 +08:00
andyque
5f34c1f072
add PageView vertical scroll support
2015-08-01 18:18:46 +08:00