#include "CEntityFlag.h"
#include "resource.h"

IMPLEMENT_DYNAMIC(CEntityFlag, CDialog)

BEGIN_MESSAGE_MAP(CEntityFlag, CDialog)
	ON_BN_CLICKED(IDOK, &CEntityFlag::OnBnClickedOk)
END_MESSAGE_MAP()

CEntityFlag::CEntityFlag(CWnd* pParent)
	: CDialog(IDD_CENTITYFLAG, pParent)
{
}

CEntityFlag::~CEntityFlag()
{
}

void CEntityFlag::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	DDX_Control(pDX, IDC_CHECK_TCHECK, check_tCheck);
	DDX_Control(pDX, IDC_CHECK_TTOUCH, check_tTouch);
	DDX_Control(pDX, IDC_CHECK_TDEATH, check_tDeath);
	DDX_Control(pDX, IDC_CHECK_TCRUSH, check_tCrush);
	DDX_Control(pDX, IDC_CHECK_THURT, check_tHurt);
	DDX_Control(pDX, IDC_CHECK_TDAMAGE, check_tDamage);
	DDX_Control(pDX, IDC_CHECK_FSHOW, check_fShow);
	DDX_Control(pDX, IDC_CHECK_FHIDE, check_fHide);
	DDX_Control(pDX, IDC_CHECK_SKSHOW, check_skShow);
	DDX_Control(pDX, IDC_CHECK_SKHIDE, check_skHide);
	DDX_Control(pDX, IDC_CHECK_LR, check_lr);
	DDX_Control(pDX, IDC_CHECK_TEXT, check_text);
	DDX_Control(pDX, IDC_CHECK_SAVE, check_save);
	DDX_Control(pDX, IDC_CHECK_ZEROANI, check_simpAni);
}

BOOL CEntityFlag::OnInitDialog()
{
	CDialog::OnInitDialog();
	check_tCheck.SetCheck(outFlag.tCheck);
	check_tTouch.SetCheck(outFlag.tTouch);
	check_tDeath.SetCheck(outFlag.tDeath);
	check_tCrush.SetCheck(outFlag.tCrush);
	check_tHurt.SetCheck(outFlag.tHurt);
	check_tDamage.SetCheck(outFlag.tDamage);
	check_fShow.SetCheck(outFlag.fShow);
	check_fHide.SetCheck(outFlag.fHide);
	check_skShow.SetCheck(outFlag.skShow);
	check_skHide.SetCheck(outFlag.skHide);
	check_lr.SetCheck(outFlag.lr);
	check_text.SetCheck(outFlag.text);
	check_save.SetCheck(outFlag.save);
	check_simpAni.SetCheck(outFlag.simpAni);
	return 0;
}


void CEntityFlag::OnBnClickedOk()
{
	// TODO: 在此添加控件通知处理程序代码
	outFlag.tCheck = check_tCheck.GetCheck();
	outFlag.tTouch = check_tTouch.GetCheck();
	outFlag.tDeath = check_tDeath.GetCheck();
	outFlag.tCrush = check_tCrush.GetCheck();
	outFlag.tHurt = check_tHurt.GetCheck();
	outFlag.tDamage = check_tDamage.GetCheck();
	outFlag.fShow = check_fShow.GetCheck();
	outFlag.fHide = check_fHide.GetCheck();
	outFlag.skShow = check_skShow.GetCheck();
	outFlag.skHide = check_skHide.GetCheck();
	outFlag.lr = check_lr.GetCheck();
	outFlag.text = check_text.GetCheck();
	outFlag.save = check_save.GetCheck();
	outFlag.simpAni = check_simpAni.GetCheck();
	CDialog::OnOK();
}
