File tree Expand file tree Collapse file tree 1 file changed +3
-7
lines changed
extensions/ccui/uiwidgets Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -460,9 +460,7 @@ ccui.Button = ccui.Widget.extend(/** @lends ccui.Button# */{
460
460
_onPressStateChangedToNormal : function ( ) {
461
461
this . _buttonScale9Renderer . setSpriteFrame ( this . _buttonNormalSpriteFrame ) ;
462
462
463
- if ( this . _scale9Enabled ) {
464
- this . _buttonScale9Renderer . setState ( ccui . Scale9Sprite . state . NORMAL ) ;
465
- }
463
+ this . _buttonScale9Renderer . setState ( ccui . Scale9Sprite . state . NORMAL ) ;
466
464
467
465
if ( this . _pressedTextureLoaded ) {
468
466
if ( this . pressedActionEnabled ) {
@@ -500,9 +498,7 @@ ccui.Button = ccui.Widget.extend(/** @lends ccui.Button# */{
500
498
} ,
501
499
502
500
_onPressStateChangedToPressed : function ( ) {
503
- if ( this . _scale9Enabled ) {
504
- this . _buttonScale9Renderer . setState ( ccui . Scale9Sprite . state . NORMAL ) ;
505
- }
501
+ this . _buttonScale9Renderer . setState ( ccui . Scale9Sprite . state . NORMAL ) ;
506
502
507
503
if ( this . _pressedTextureLoaded ) {
508
504
this . _buttonScale9Renderer . setSpriteFrame ( this . _buttonClickedSpriteFrame ) ;
@@ -539,7 +535,7 @@ ccui.Button = ccui.Widget.extend(/** @lends ccui.Button# */{
539
535
_onPressStateChangedToDisabled : function ( ) {
540
536
//if disable resource is null
541
537
if ( ! this . _disabledTextureLoaded ) {
542
- if ( this . _normalTextureLoaded && this . _scale9Enabled ) {
538
+ if ( this . _normalTextureLoaded ) {
543
539
this . _buttonScale9Renderer . setState ( ccui . Scale9Sprite . state . GRAY ) ;
544
540
}
545
541
} else {
You can’t perform that action at this time.
0 commit comments