Provide a key to go to the previous slide in SampleApp.
authorscroggo@google.com <scroggo@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>
Wed, 15 Aug 2012 20:03:06 +0000 (20:03 +0000)
committerscroggo@google.com <scroggo@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>
Wed, 15 Aug 2012 20:03:06 +0000 (20:03 +0000)
The left key now mirrors the right key, and goes to the previous slide.
It used to change the device type, which can still be done by pressing
'd' or using the menu.

Review URL: https://codereview.appspot.com/6443133

git-svn-id: http://skia.googlecode.com/svn/trunk@5119 2bbb7eff-a529-9590-31e7-b0007b416f81

samplecode/SampleApp.cpp

index 8c6a2bd..1dfc75c 100644 (file)
@@ -1874,7 +1874,9 @@ bool SampleWindow::onHandleKey(SkKey key) {
             }
             break;
         case kLeft_SkKey:
-            toggleRendering();
+            if (this->previousSample()) {
+                return true;
+            }
             return true;
         case kUp_SkKey:
             if (USE_ARROWS_FOR_ZOOM) {