#pragma once
#include "CheckBox.h"

class GAMEGUI_API RadioButton : public GUIElement
{
	Label* m_pCaption;
	Image* m_pImage;

	DXTexture* m_pTex[2];

	bool m_bChecked;

	static void OnImageClick(GUIElement* const sender, const GUIEVENT evnt, void* pData);

protected:
	virtual ~RadioButton(void);

public:
	RadioButton(MenuManager* const pManager, const DWORD id);

	virtual void OnUpdate(void);
	virtual void SetSize(const float xl, const float yl);

	void SetTexture(DXTexture* const unchecked, DXTexture* const checked);
	void SetAlphaBlend(const bool ab) { m_pImage->SetAlphaBlend(ab); }
	void SetText(const XString& cap) { m_pCaption->SetText(cap); }
	void SetFont(Font* const fnt) { m_pCaption->SetFont(fnt); }

	bool IsChecked(void) const { return m_bChecked; }
	void SetChecked(const bool ck);
};
