Ejemplo n.º 1
0
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;
}
Ejemplo n.º 2
0
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);
    }
}