コード例 #1
0
ファイル: EventHandler.cpp プロジェクト: zidane168/AutoPlay
void CEventHandler::LoadTrain(CWndControl* sender,CMainDlg* parent){
	
	CCharacter* m_char = parent->m_clsCurChar;
	if(m_char==NULL)
		return;
	CWndDlg* dlgCtrlContainer = parent->m_controlDlg;
	CWndComboBox * cmbTrain = static_cast<CWndComboBox*> (dlgCtrlContainer->GetControl(L"cmbGoBack"));
	//m_char->m_iTrainMap =_ttoi( cmbTrain->GetItem(cmbTrain->GetSelectedIndex()));
	m_char->m_iTrainMap =m_char->GetMapId( cmbTrain->GetItem(cmbTrain->GetSelectedIndex()));
	parent->MappingObj();
}
コード例 #2
0
ファイル: EventHandler.cpp プロジェクト: zidane168/AutoPlay
void CEventHandler::SetPriority(CWndControl* sender,CMainDlg* parent){
	CWndComboBox* cmb = static_cast<CWndComboBox*> (sender);
	CWndDlg* dlgCtrlContainer = parent->m_controlDlg;
	CCharacter* m_char = parent->m_clsCurChar;
	if(m_char!=NULL){
	
		m_char->m_iPriority = cmb->GetSelectedIndex();
		
		CWndButton * btn = static_cast<CWndButton*> (dlgCtrlContainer->GetControl(L"btnPriority"));
		btn->SetEnabled(m_char->m_iPriority==1 || m_char->m_iPriority==2);
		m_char->serialize->SaveInfo(L"Priority",m_char->m_iPriority,TagType::Element,L"/Info");
	}
}