         // Instancing
         else if (key == '8')
             renderer.dynamicInstancing = !renderer.dynamicInstancing;
+
+        // Take screenshot
+        else if (key == '9')
+        {
+        Image@ screenshot = Image();
+        graphics.TakeScreenShot(screenshot);
+        screenshot.FlipVertical();
+        screenshot.SavePNG("Data/" + time.timeStamp + " Screenshot.png"); // Here we save in the Data folder with date and time appended
+	    }
     }
 }

{
    // Create logo
    CreateLogo();

    // Create console and debug HUD
    CreateConsoleAndDebugHud();

// Common sample initialization as a framework for all samples.
//    - Create Urho3D logo at screen;
//    - Set custom window title and icon;
//    - Create Console and Debug HUD, and use F1 and F2 key to toggle them;
//    - Toggle rendering options from the keys 1-8;
//    - Take screenshots with key 9;
//    - Handle Esc key down to hide Console or exit application;

Sprite@ logoSprite;
