TButton(Sender).Enabled := false; SwitchTo3D; if Assigned(FContainer) then begin TAnimator.AnimateFloat(FContainer, ‘Position.Z‘, 300, 0.2); TAnimator.AnimateFloatDelay(FContainer, ‘Position.Z‘, 0, 0.2, 1); TAnimator.AnimateFloatWait(FContainer, ‘RotationAngle.Y‘, 360, 1.5, TAnimationType.&In, TInterpolationType.Linear); end; SwitchTo2D; TButton(Sender).Enabled := true;
|
((TButton *)Sender)->Enabled = false; SwitchTo3D(); if(FContainer!=NULL) { TAnimator::AnimateFloat(FContainer, "Position.Z", 300, 0.2); TAnimator::AnimateFloatDelay(FContainer, "Position.Z", 0, 0.2, 1); TAnimator::AnimateFloatWait(FContainer, "RotationAngle.Y", 360, 1.5, TAnimationType::InOut , TInterpolationType::Linear); } SwitchTo2D(); ((TButton *)Sender)->Enabled = true;
|
FViewport := TViewport3D.Create(Self); FViewport.Parent := Self; FViewport.Align := TAlignLayout.Client; FViewport.Color := claNull; FContainer := TLayer3D.Create(Self); FContainer.Parent := FViewport; FContainer.Projection := TProjection.Screen; FContainer.Transparency := true; FContainer.Align := TAlignLayout.Client; LImg := TImage.Create(Self); //LImg.Align := TAlignLayout.Client; LImg.Position.X := rcmain.Position.X; LImg.Position.Y := rcmain.Position.Y; LImg.Width := rcmain.Width; LImg.Height := rcmain.Height; LImg.Bitmap.Assign(rcmain.MakeScreenshot); LImg.Margins := rcmain.Margins; LImg.Parent := FContainer; rcmain.Visible := False;
|
FViewport = new TViewport3D(this); FViewport->Align = TAlignLayout::Client; FViewport->Color = TAlphaColorRec::Null; FViewport->Parent = this; FContainer = new TLayer3D(this); FContainer->Parent = FViewport; FContainer->Projection = TProjection::Screen; FContainer->Transparency = true; FContainer->Align = TAlignLayout::Client; LImg = new TImage(this); // LImg->Align = TAlignLayout::Client; LImg->Position->X = rcmain->Position->X; LImg->Position->Y = rcmain->Position->Y; LImg->Width = rcmain->Width; LImg->Height = rcmain->Height; LImg->Bitmap->Assign(rcmain->MakeScreenshot()); LImg->Margins = rcmain->Margins; LImg->Parent = FContainer; rcmain->Visible = false;
|