예제 #1
0
파일: CUWPs.cpp 프로젝트: mdejean/Chkdraft
void CUWPsWindow::NotifyButtonClicked(int idFrom, HWND hWndFrom)
{
	ChkCuwp cuwp = {};
	if ( chkd.maps.curr->GetCuwp(selectedCuwp, cuwp) )
	{
		switch ( idFrom )
		{
			case CheckInvincible: cuwp.SetUnitIsInvincible(checkInvincible.isChecked()); break;
			case CheckBurrowed: cuwp.SetUnitIsBurrowed(checkBurrowed.isChecked()); break;
			case CheckLifted: cuwp.SetBuildingInTransit(checkLifted.isChecked()); break;
			case CheckHallucinated: cuwp.SetUnitIsHallucinated(checkHallucinated.isChecked()); break;
			case CheckCloaked: cuwp.SetUnitIsCloaked(checkCloaked.isChecked()); break;
		}
		chkd.maps.curr->ReplaceCuwp(cuwp, selectedCuwp);
	}
	std::cout << "CUWP Notify Button Clicked" << std::endl;
}
예제 #2
0
파일: CUWPs.cpp 프로젝트: jjf28/Chkdraft
void CUWPsWindow::NotifyButtonClicked(int idFrom, HWND hWndFrom)
{
    ChkCuwp cuwp = {};
    if ( CM->GetCuwp(selectedCuwp, cuwp) )
    {
        switch ( idFrom )
        {
            case CheckInvincible: cuwp.SetUnitIsInvincible(checkInvincible.isChecked()); break;
            case CheckBurrowed: cuwp.SetUnitIsBurrowed(checkBurrowed.isChecked()); break;
            case CheckLifted: cuwp.SetBuildingInTransit(checkLifted.isChecked()); break;
            case CheckHallucinated: cuwp.SetUnitIsHallucinated(checkHallucinated.isChecked()); break;
            case CheckCloaked: cuwp.SetUnitIsCloaked(checkCloaked.isChecked()); break;
        }
        CM->ReplaceCuwp(cuwp, selectedCuwp);
        CM->notifyChange(false);
    }
}