Skip to content

Commit

Permalink
Merge pull request cocos2d#9758 from andyque/update-changelog
Browse files Browse the repository at this point in the history
Update releasenote
  • Loading branch information
minggo committed Dec 31, 2014
2 parents d7fceb3 + 4919462 commit 9fa768f
Showing 1 changed file with 24 additions and 1 deletion.
25 changes: 24 additions & 1 deletion docs/RELEASE_NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -148,4 +148,27 @@ camera->enableFrustumCulling(true, true);
Note that when you can make sure that all the stuff is inside the frustum you can turn off the frustum culling.
For more infomation please reffer to the cpptests/CameraTest
For more infomation please reffer to the cpptests/CameraTest
### Use less resources to create ui::CheckBox and ui::Slider
Now we could use less resources to create ui::CheckBox and ui::Slider.
To create an ui::CheckBox, we could simply pass the normal state box and active texture.
```cpp
CheckBox* checkBox2 = CheckBox::create("cocosui/check_box_normal.png",
"cocosui/check_box_active.png");
```

To create an ui::Slider, we could only pass the slider bar texture and normal ball texture.

```cpp
Slider* sliderScale9 = Slider::create("cocosui/slidbar.png", "cocosui/sliderballnormal.png");
```

If the selected state texture is missing, when user press the widget, the normal texture will scale.

If the disable state texture is missing, when the widget is in disable state, we use gray shader to turn the normal state texture to gray.

The original ui::Button also support the gray shader enhancement.

0 comments on commit 9fa768f

Please sign in to comment.