; CaptureStatus Example ; --------------------- ; Requires Extended mode. Graphics3D 640,480,0,2 SetBuffer BackBuffer() camera=CreateCamera() PositionEntity camera,0,1,-6 light=CreateLight() RotateEntity light,45,45,0 trophy=CreateSphere(24) EntityColor trophy,255,120,60 While Not KeyDown(1) ; Space arms a screenshot; watch the status change as it is taken If KeyHit(57) Then CaptureScreenshot "capture_example.png" TurnEntity trophy,0.5,1.5,0 ; CaptureStatus tracks the life of a capture request status=CaptureStatus() If status=0 Then label$="0 - idle" If status=1 Then label$="1 - armed for the next Flip" If status=2 Then label$="2 - capture_example.png saved" If status=-1 Then label$="-1 - rejected or failed" ; Arrow keys move the camera If KeyDown(200) Then MoveEntity camera,0,0,0.1 If KeyDown(208) Then MoveEntity camera,0,0,-0.1 If KeyDown(203) Then TurnEntity camera,0,1,0 If KeyDown(205) Then TurnEntity camera,0,-1,0 RenderWorld Text 0,0,"Arrow keys: move camera Space: take screenshot Esc: exit" Text 0,20,"CaptureStatus() = "+label Flip Wend End