---
title: "cocos2dx-js ccui.Button的disabled状态"
author: "nomandia"
date: "2014-09-19T01:40:35Z"
tags: []
categories: ["移动开发"]
slug: "cocos2dx-js-ccui-button-disabled"
draft: false
lastmod: "2014-09-19T01:40:35Z"
id: 2118045
url: "https://nomandia.iteye.com/blog/2118045"
---

这个设定其实很简单，只需 设置 button.setBright(false)，即可。直接设定 setEnabled(false)只能让button不接收事件，但图片不显示为disabled状态，可能是由于习惯的问题吧。

c++的代码就不看了。