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
#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
相关文章推荐
- Cocos2d-x UI开发之CCControlColourPicker控件类使用实例
- cocos2d-x-2.0新增加了几个UI控件,这里我介绍下常用的这几个UI控件(CCControlSlider、CCControlSwitch、CCControlColourPicker)使用方法
- Cocos2d-x中颜色选择盘类CCControlColourPicker的使用
- CCControlExtension/CCControlSaturationBrightnessPicker
- CCControlColourPicker学习笔记
- UI开发之控件类-CCControlColourPicker
- CCControlExtension/CCControlHuePicker
- cocos2d-x-2.0 新增UI的使用方法(CCControlSlider、CCControlSwitch、CCControlColourPicker、ListView)
- cocos2d-x-2.0新增加了几个UI控件,这里我介绍下常用的这几个UI控件(CCControlSlider、CCControlSwitch、CCControlColourPicker)使用方法
- cocos2d-x-2.0新增加了几个UI控件,这里我介绍下常用的这几个UI控件(CCControlSlider、CCControlSwitch、CCControlColourPicker)使用方法
- ControlExtensionTest(二)-----CCControlSlider
- CCControlExtension/CCControlSwitch
- CCControlExtension/CCControlUtils
- GUI之CCControlExtension
- CCControlExtension/CCControlPotentiometer
- CCControlExtension/CCControlSlider
- CCControlExtension/CCControlButton
- CCControlExtension/CCControlStepper
- CCControlExtension/CCControl
- CCControlExtension/CCControlButton