Commit Graph

966 Commits

Author SHA1 Message Date
Mazyad Alabduljaleel 2bb26e31d0 simplify CGRect math 2015-07-17 17:38:16 +03:00
Mazyad Alabduljaleel 54f52dac80 reduce header exposure
this is important, so we know that this class is only used in one place
2015-07-17 17:37:15 +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
Mazyad Alabduljaleel 7861bfd403 Final touch ups:
- group textfield delegate methods
- remove unused code
2015-07-17 16:25:45 +03:00
andyque c9ca8d9ce8 fix PageView cur index issue 2015-07-17 10:39:01 +08:00
andyque 96f6c44281 fix auto scrolling and curPageIdx issue 2015-07-16 16:50:47 +08:00
pandamicro b094367c94 Merge pull request #12874 from pandamicro/v3.7-release
Remove cleanup from auto bindings add made it support override in JS
2015-07-16 16:15:26 +08:00
pandamicro 490d5a3747 Remove cleanup from auto bindings add made it support override in JS 2015-07-16 14:09:26 +08:00
andyque 517221a0df add jumpToPage API to PageView.
1. This commit also fix the default font size issue in ui::Button.
2015-07-16 11:33:57 +08:00
andyque 2f31f6baa6 fixed Scale9Sprite gray state issue.
When call `setCapInsets`, the Scale9Sprite's inner sprite will be
rebuild and it's state will be lose.

This commit reset the shader state.
2015-07-15 14:35:13 +08:00
andyque e4cad50c2f fix tons of warnings 2015-07-15 12:04:48 +08:00
Mazyad Alabduljaleel 008a5ef89c replaced tabs with whitespace 2015-07-14 16:34:11 +03:00
Mazyad Alabduljaleel 6f8bc04934 First commit for improving iOS EditBox
+ Moved internal stuff to the implementation file
+ Added pragma and organized methods
+ cleanup synthesize, instance variables, and overall code style for ObjC
2015-07-14 16:18:03 +03:00
andyque 91dfb07a8c add more descriptive message to ASSET macro. 2015-07-14 15:28:36 +08:00
子龙山人 616efbf0c3 Merge pull request #12812 from neokim/refactor_scroll_view_bar
Refactor scroll view bar
2015-07-14 13:34:07 +08:00
Neo Kim 7882a534c1 Correct the wrong boolean statement and make it easy to read 2015-07-14 11:58:44 +09:00
Neo Kim 863c3a0a2a Correct a typo 2015-07-14 10:17:05 +09:00
andyque fc673ee502 Merge branch 'v3.7-release' into v3 2015-07-13 22:44:54 +08:00
Neo Kim 9757ee4ea8 Refine scroll event dispatching. And add an event to track every move including jump and so on. 2015-07-13 21:28:17 +09:00
Neo Kim 22ea504af8 Add methods to manipulate scroll bar's opacity 2015-07-13 21:28:16 +09:00
Neo Kim f558158667 Use addProtectedChild() instead of addChild() in ScrollViewBar 2015-07-13 21:28:16 +09:00
XiaoFeng 92d78efce0 Fix percentage setting won't effect when UISlider's background resource set to null 2015-07-10 17:00:16 +08:00
xpol 29dcbe6685 Fixes some warnings and a related bug in CCSprite.
This story tells us that we should not just ignore warnings.
2015-07-07 23:01:24 +08:00
子龙山人 f28fbdd0c4 Merge pull request #12683 from neokim/add_scroll_bar_into_scroll_view
Add scroll bar feature into ScrollView
2015-07-07 13:56:09 +08:00
Vincent Yang b4559a005b Fix bug taken from pr12602: scroll view can't scroll if pressed the button on it. 2015-07-07 10:42:04 +08:00
XiaoFeng 214684b3be Fix 2015-07-06 16:45:04 +08:00
XiaoFeng 9fab1e7702 Change to use auto & for each to enum sub items 2015-07-06 16:39:00 +08:00
XiaoFeng d6fc8ecc94 Fix when use percentage size & position to a UIWidget which parent is a layout component, when change simulator screen size, layout won't effect correctly. 2015-07-06 16:02:19 +08:00
Neo Kim c4dc9b04fd Add a guard filtering tries to set same value. 2015-07-06 14:54:28 +09:00
Neo Kim 0ff7aaef95 Modify loop iteration codes 2015-07-06 11:30:24 +09:00
Neo Kim 43308e258a Fix an issue of not releasing Texture instance in ScrollViewBar 2015-07-06 11:29:39 +09:00
Neo Kim a4803c6713 Remove unnecessary commented out code. 2015-07-05 21:30:13 +09:00
Neo Kim 3ab4285960 Refactor code 2015-07-04 16:06:05 +09:00
Neo Kim 6264f7fefb Correct include-related build errors in some platforms 2015-07-04 15:03:05 +09:00
Neo Kim ceeca575f3 Replace 'margin' of scroll bar with 'positionFromCorner' 2015-07-04 14:05:47 +09:00
Neo Kim f667b085b8 Change not to show scroll bar when the scroll view is initiated. 2015-07-04 09:59:22 +09:00
Neo Kim 9548d85f08 Fix radio button group clear issue 2015-07-04 09:57:54 +09:00
Neo Kim 3b6cd4dffc Modify indentation to comply with the convention 2015-07-04 09:56:53 +09:00
Neo Kim 86cbd59bfd Add UIScrollViewBar.cpp into CMake and Windows project configuration. 2015-07-04 09:56:53 +09:00
Neo Kim 60c32f6fb5 Refactor some codes 2015-07-04 09:56:53 +09:00
Neo Kim ec45be699d Add UIScrollViewBar class documentation 2015-07-04 09:56:52 +09:00
Neo Kim c093bb18e2 Add scroll bar manipulation methods into ScrollView 2015-07-04 09:56:52 +09:00
Neo Kim 9a11cfd496 Add a way of changing scroll bar width 2015-07-04 09:56:52 +09:00
Neo Kim 2cae17b462 Add scroll bar feature into ScrollView 2015-07-04 09:56:52 +09:00
pandamicro 1b22438792 Merge branch 'v3.7-release' of https://github.com/cocos2d/cocos2d-x into merge-v3.7
Conflicts:
	cocos/ui/UICheckBox.cpp
2015-07-03 10:23:49 +08:00
子龙山人 5b971ee93d Merge pull request #12607 from neokim/add_radio_button_and_group
Add RadioButton and RadioButtonGroup widgets
2015-07-02 17:12:59 +08:00
XiaoFeng 668dc50e07 Fix when slider set to disable mode then clean slider ball disable texture, normal texture won't show 2015-07-02 16:45:17 +08:00
Neo Kim 61df7bc827 Add class documentation 2015-07-02 15:20:06 +09:00
Neo Kim ec589c8d6f Correct the wrong comment for lua 2015-07-02 15:19:50 +09:00
Neo Kim 0e35ee597a Add logic for not belonging radio button checking. 2015-07-02 15:01:24 +09:00
Neo Kim c4aa5a6274 Remove the code related to becoming parent node of radio buttons. Radio button group is not a parent node of radio buttons anymore. 2015-07-02 11:50:50 +09:00
Neo Kim 6550a9ccc2 Replace all tabs to 4 spaces to comply with the convention 2015-07-02 11:30:14 +09:00
XiaoFeng 9a905ede56 Fix check box front cross texture expand to normal size when change status between normal and disable frequency 2015-07-02 10:29:53 +08:00
Neo Kim 4b2bff4674 Change RadioButtonGroup not to be a node-parent of radio buttons but just a grouping node. And add one more test case. 2015-07-02 11:28:14 +09:00
Vincent Yang d26c08de46 Merge branch 'v3_scene3d_fixvisitingcamera' into v3_scene3dtest 2015-07-01 14:47:42 +08:00
yangxiao 269feeb1f9 remove stencil from Renderstate 2015-07-01 14:06:37 +08:00
Neo Kim a64e50688e Add the new files into CMake and Windows project configurations. 2015-07-01 12:21:42 +09:00
Vincent Yang 96b49277cc [ci skip] add comment for UIWidget::_hittedByCamera. 2015-07-01 11:03:09 +08:00
Neo Kim 3f05ad2b98 Replace all tabs to 4 spaces to comply with the convention 2015-06-30 20:31:31 +09:00
Neo Kim f5e7184f0b Add new cpp files into Android.mk 2015-06-30 18:50:13 +09:00
Neo Kim bed90606d3 Add RadioButton feature and a test case for it. 2015-06-30 18:50:13 +09:00
Neo Kim a37015d083 To create radio button feature which uses almost same logic with CheckBox, extract the common logic from CheckBox and make it as AbstractCheckButton class. 2015-06-30 18:50:13 +09:00
Vincent Yang 2ba6f266ad Fixed bug: UI component can't click correctly by moving UI and camera far away of origin. 2015-06-30 14:32:14 +08:00
子龙山人 950cb840c2 Merge pull request #12582 from super626/listview
fix camera mask of listview
2015-06-30 10:25:57 +08:00
子龙山人 c997284825 Merge pull request #12352 from andyque/add-two-events-to-ui-slider
Improve ui::Slider
2015-06-29 17:01:27 +08:00
yangxiao a56a5d24b6 fix camera mask of listview 2015-06-29 14:41:03 +08:00
andyque 60834e6f0c Merge branch 'v3' into v3-finish-android-9-patch-image-format
Conflicts:
	cocos/2d/libcocos2d_8_1/libcocos2d_8_1/libcocos2d_8_1.Shared/libcocos2d_8_1.Shared.vcxitems.filters
2015-06-29 12:05:52 +08:00
andyque 30d2129f0c improve indent and getTime function 2015-06-29 11:52:53 +08:00
pandamicro 4b34963329 Merge pull request #12537 from andyque/fix-v3.7-scrollView-dpi
use inch for childFocusCancelOffset in UIScrollView
2015-06-26 08:11:00 +08:00
pandamicro 3136bef9e3 Fix convertDistanceFromPointToInch logic (add x, y) 2015-06-25 21:34:00 +08:00
pandamicro e29284374b Fix convertDistanceFromPointToInch logic 2015-06-25 20:57:23 +08:00
samuele3hu 3a654b4615 Fix the compile error of js-template by using android-studio compile param. 2015-06-25 17:44:51 +08:00
andyque d83f528327 use inch for childFocusCancelOffset in UIScrollView 2015-06-25 16:57:00 +08:00
andyque 7fff2bd3c4 fix nine patch image parser error on Windows. 2015-06-23 15:42:58 +08:00
Neo Kim 9757be0f81 Remove debugging logs 2015-06-22 14:49:30 +09:00
Neo Kim 71c98da2aa Apply ease out action on inertia scroll 2015-06-22 14:30:45 +09:00
Neo Kim c4fa99444c Simplify the inertia scroll implementation 2015-06-22 14:30:36 +09:00
Neo Kim c70c923674 Separate the inertia scroll from auto scroll. And implement auto scroll and bounce back as one logic. The bounce back movement is one of auto scroll feature. 2015-06-22 14:30:30 +09:00
Neo Kim 7422b20da9 Refactor some functions 2015-06-22 14:27:19 +09:00
Neo Kim 85fc5b3f89 Change to comply to Cocos2d-x convention 2015-06-22 14:27:11 +09:00
Neo Kim 6c212a7ddb Replace the existing bounce back feature with another one like iOS bounce-back. The inner container moves smoother when bouncing back.
It does what the existing code did including scroll event dispatching and attenuating.
2015-06-22 14:27:00 +09:00
Neo Kim 1058ab9172 Add necessary member variables and methods 2015-06-22 14:26:51 +09:00
Neo Kim a8f77710f5 Refactor some functions and remove redundant codes 2015-06-22 14:10:25 +09:00
Neo Kim 876c94f352 Remove the boundary of bouncing and apply half-movement when out of boundary like iOS bounce back. 2015-06-22 14:05:53 +09:00
Neo Kim ff3f990142 Add isOutOfBoundary() functions 2015-06-22 14:05:53 +09:00
Neo Kim c3c6eeb6c1 Refactor some functions 2015-06-22 14:05:52 +09:00
Neo Kim a3ff9573b0 Remove duplicated logic in bounceScrollChildren() 2015-06-22 14:05:51 +09:00
Neo Kim 1971b01280 Make the event dispatch functions into one function after removing duplicated logic. 2015-06-22 14:05:50 +09:00
Neo Kim 31bf9f714d Merge bouncing and non-bouncing logics as one. 2015-06-22 14:05:50 +09:00
Neo Kim 6a0609a687 Merge the logics for bouncing of VERTICAL, HORIZONTAL and BOTH in one function. VERTICAL and HORIZONTAL can be processed as BOTH. 2015-06-22 14:05:49 +09:00
Neo Kim 368b5e8f12 Remove duplicated logics in scrollChildrenBoth(), and extract meaningful logic into separate functions. 2015-06-22 14:05:49 +09:00
Vincent Yang 187437068f Fixed bug: wrong usage of isVisitableByVisitingCamera, which should only effect draw call. 2015-06-18 10:32:30 +08:00
Vincent Yang f8a5b1e18c Fixed bug: UI component can't click correctly by moving UI and camera far away of origin. 2015-06-18 10:23:52 +08:00
andyque b8826d9de4 improve the enum naming 2015-06-16 09:42:06 +08:00
Ricardo Quesada c17da7e90d Removes not-needed draws 2015-06-15 10:40:47 -07:00
andyque a880dc86e9 improve comments 2015-06-15 19:36:20 +08:00
andyque c1108db31e Improve ui::Slider
1. Add two APIs to gain big precision
2. Add three type events in Slider's callback.
2015-06-15 18:31:21 +08:00
Ricardo Quesada 32aae46343 fixes 2015-06-12 15:37:29 -07:00
Ricardo Quesada 2a3347dd49 RenderState: default state fixes
parts of cocos2d code calls GL directly.
This should be avoided since v3.7 since the
`RenderState::StateBlock::_defaultState` won't know that
and the state will be invalid.
In order to fix this issue, after calling GL directly, you should
update the `_defaultState` manually.
2015-06-12 15:03:48 -07:00