aboutsummaryrefslogtreecommitdiffhomepage
path: root/samplecode
diff options
context:
space:
mode:
authorGravatar scroggo@google.com <scroggo@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-08-15 20:03:06 +0000
committerGravatar scroggo@google.com <scroggo@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-08-15 20:03:06 +0000
commite2dd973e4b0dac58610b73d577e91899c2b1c4ea (patch)
treed4d1977fa4dfcd6fc6914a42f70bd27bad456fb1 /samplecode
parenta8db8fe39a640bda4b85b9342c3b6b2525142afa (diff)
Provide a key to go to the previous slide in SampleApp.
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
Diffstat (limited to 'samplecode')
-rw-r--r--samplecode/SampleApp.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/samplecode/SampleApp.cpp b/samplecode/SampleApp.cpp
index 8c6a2bd1d0..1dfc75c502 100644
--- a/samplecode/SampleApp.cpp
+++ b/samplecode/SampleApp.cpp
@@ -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) {