Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EButton Renamed Button #64

Merged
merged 1 commit into from
Dec 16, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 18 additions & 18 deletions cocos2d/core/components/CCButton.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ var EventTarget = require("../event/event-target");

/**
* Enum for transition type
* @enum EButton.Transition
* @enum Button.Transition
*/
var Transition = cc.Enum({
/**
Expand All @@ -49,7 +49,7 @@ var Transition = cc.Enum({
* Click event will register a event to target component's handler.
* And will trigger when a click event emit
*
* @class EButton.ClickEvent
* @class Button.ClickEvent
*/
var ClickEvent = cc.Class({
name: 'cc.ClickEvent',
Expand Down Expand Up @@ -103,18 +103,18 @@ var EVENT_HOVER_OUT = 'hover-out';
/**
* Button has 3 Transition types
* When Button state changed:
* If Transition type is EButton.Transition.NONE, Button will do nothing
* If Transition type is EButton.Transition.COLOR, Button will change target's color
* If Transition type is EButton.Transition.SPRITE, Button will change target SpriteRenderer's sprite
* If Transition type is Button.Transition.NONE, Button will do nothing
* If Transition type is Button.Transition.COLOR, Button will change target's color
* If Transition type is Button.Transition.SPRITE, Button will change target SpriteRenderer's sprite
*
* Button will trigger 5 events:
* EButton.EVENT_TOUCH_DOWN
* EButton.EVENT_TOUCH_UP
* EButton.EVENT_HOVER_IN
* EButton.EVENT_HOVER_MOVE
* EButton.EVENT_HOVER_OUT
* Button.EVENT_TOUCH_DOWN
* Button.EVENT_TOUCH_UP
* Button.EVENT_HOVER_IN
* Button.EVENT_HOVER_MOVE
* Button.EVENT_HOVER_OUT
*
* @class EButton
* @class Button
* @extends Component
*/
var Button = cc.Class({
Expand Down Expand Up @@ -160,8 +160,8 @@ var Button = cc.Class({

/**
* Transition type
* @property {EButton.Transition} transition
* @default EButton.Transition.Node
* @property {Button.Transition} transition
* @default Button.Transition.Node
*/
transition: {
default: Transition.NONE,
Expand Down Expand Up @@ -271,9 +271,9 @@ var Button = cc.Class({
/**
* Transition target.
* When Button state changed:
* If Transition type is EButton.Transition.NONE, Button will do nothing
* If Transition type is EButton.Transition.COLOR, Button will change target's color
* If Transition type is EButton.Transition.SPRITE, Button will change target SpriteRenderer's sprite
* If Transition type is Button.Transition.NONE, Button will do nothing
* If Transition type is Button.Transition.COLOR, Button will change target's color
* If Transition type is Button.Transition.SPRITE, Button will change target SpriteRenderer's sprite
* @property {cc.Node} target
*/
target: {
Expand All @@ -287,7 +287,7 @@ var Button = cc.Class({

/**
* If Button is clicked, will trigger event's handler
* @property {[EButton.ClickEvent]} clickEvents
* @property {[Button.ClickEvent]} clickEvents
*/
clickEvents: {
default: [],
Expand Down Expand Up @@ -499,4 +499,4 @@ var Button = cc.Class({

cc.js.addon(Button.prototype, EventTarget.prototype);

cc.EButton = module.exports = Button;
cc.Button = module.exports = Button;