#ifndef _CCHECKBOX_H_
#define _CCHECKBOX_H_

//#include "../App/EngineH.h"
#include "CImageGUI.h"
#include "../App/CBaseGL.h"

class C_CHECKBOX_0 : public C_GIMAGE_0
{
private :
	bool _check;
	uint _id_texture_off;
	uint _id_texture_on;

	inline virtual void				_Nastav()
	{
		if(!_check )	this->SetIdImage(_id_texture_off);
		if( _check )	this->SetIdImage(_id_texture_on);
	}

public :
	C_CHECKBOX_0(std::string name, uint image_off, uint image_on, TRect rect, TRGBi color = RGBi_WHITE);
	~C_CHECKBOX_0();

public :
	virtual void			MouseClick(int button,int x,int y);
	bool					GetCheckStav() const {return _check;}
	inline virtual void			SetCheckStav(bool stav)
	{
		_check = stav;
		_Nastav();
	}
};

#endif //_CCHECKBOX_H_