コード例 #1
0
void CDiagramEntityContainer::MakeSameSizeSelected()
{
	if( GetSelectCount() > 1 )
	{
		CDiagramEntity* obj = GetSelectedObject();
		if( obj )
		{
			double width = obj->GetRight() - obj->GetLeft();
			double height = obj->GetBottom() - obj->GetTop();
			int count = 0;
			while (obj = GetAt( count++ ))
			{
				if (!obj->IsSelected()) continue;
				obj->SetRect( obj->GetLeft(), obj->GetTop(), obj->GetLeft() + width, obj->GetTop() + height );
			}

		}
		SetModified( TRUE );
	}
}
コード例 #2
0
void CDiagramEntityContainer::BottomAlignSelected()
{
	if( GetSelectCount() > 1 )
	{
		CDiagramEntity* obj = GetSelectedObject();
		if( obj )
		{
			double bottom = obj->GetBottom();
			int count = 0;
			while (obj = GetAt( count++ ))
			{
				if (!obj->IsSelected()) continue;
				double height = obj->GetBottom() - obj->GetTop();
				double top = bottom - height;
				obj->SetRect( obj->GetLeft(), top, obj->GetRight(), bottom );
			}

		}
		SetModified( TRUE );
	}
}
コード例 #3
0
void CDiagramEntityContainer::RightAlignSelected()
{
	if( GetSelectCount() > 1 )
	{
		CDiagramEntity* obj = GetSelectedObject();
		if( obj )
		{
			double right = obj->GetRight();
			int count = 0;
			while (obj = GetAt( count++ ))
			{
				if (!obj->IsSelected()) continue;
				double width = obj->GetRight() - obj->GetLeft();
				double left = right - width;
				obj->SetRect( left, obj->GetTop(), right, obj->GetBottom() );
			}

		}
		SetModified( TRUE );
	}
}
コード例 #4
0
ファイル: Script.c プロジェクト: ckanibal/clonk-content
func Script211()
{
	if (GetSelectCount(0)<3) return(goto(211));
	SetPlrShowControl(0,"012345678_012345678 __________");
	TutorialMessage("$TxtNowmoveallclonksback$");
}