From eb91aed3f2b3825d4aec6cace1b6b5b92ce31f41 Mon Sep 17 00:00:00 2001 From: andyque Date: Tue, 27 May 2014 11:08:23 +0800 Subject: [PATCH] add constness to UICheckBox --- cocos/ui/UICheckBox.cpp | 2 +- cocos/ui/UICheckBox.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cocos/ui/UICheckBox.cpp b/cocos/ui/UICheckBox.cpp index 75fd2edc1c..4a5d81e873 100644 --- a/cocos/ui/UICheckBox.cpp +++ b/cocos/ui/UICheckBox.cpp @@ -343,7 +343,7 @@ void CheckBox::setSelectedState(bool selected) _frontCrossRenderer->setVisible(_isSelected); } -bool CheckBox::getSelectedState() +bool CheckBox::getSelectedState()const { return _isSelected; } diff --git a/cocos/ui/UICheckBox.h b/cocos/ui/UICheckBox.h index 2e35ed7798..940c3acbbb 100644 --- a/cocos/ui/UICheckBox.h +++ b/cocos/ui/UICheckBox.h @@ -170,7 +170,7 @@ public: * * @return selected true that checkbox is selected, false otherwise. */ - bool getSelectedState(); + bool getSelectedState()const; //add a call back function would called when checkbox is selected or unselected. CC_DEPRECATED_ATTRIBUTE void addEventListenerCheckBox(Ref* target,SEL_SelectedStateEvent selector);