您的位置:首页 > 其它

CCControlExtension/CCControlColourPicker

2014-05-27 15:38 543 查看
#ifndef __CCCONTROL_COLOUR_PICKER_H__
#define __CCCONTROL_COLOUR_PICKER_H__

#include "CCControl.h"
#include "CCControlUtils.h"
#include "CCControlHuePicker.h"
#include "CCControlSaturationBrightnessPicker.h"

NS_CC_EXT_BEGIN

/**
* @addtogroup GUI
* @{
* @addtogroup control_extension
* @{
*/

class CCControlColourPicker: public CCControl
{
public:
CCControlColourPicker();
virtual ~CCControlColourPicker();
virtual void setColor(const ccColor3B& colorValue);
virtual void setEnabled(bool bEnabled);
protected:
HSV m_hsv;
CC_SYNTHESIZE_RETAIN(CCControlSaturationBrightnessPicker*, m_colourPicker, colourPicker)
CC_SYNTHESIZE_RETAIN(CCControlHuePicker*, m_huePicker, HuePicker)
CC_SYNTHESIZE_RETAIN(CCSprite*, m_background, Background)

public:

static CCControlColourPicker* create();

virtual bool init();
//virtual ~CCControlColourPicker();
void hueSliderValueChanged(CCObject * sender, CCControlEvent controlEvent);
void colourSliderValueChanged(CCObject * sender, CCControlEvent controlEvent);

protected:
void updateControlPicker();
void updateHueAndControlPicker();
virtual bool ccTouchBegan(CCTouch* touch, CCEvent* pEvent);

};

// end of GUI group
/// @}
/// @}

NS_CC_EXT_END

#endif
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: