summaryrefslogtreecommitdiffstats
path: root/res/raw
diff options
context:
space:
mode:
authorJoe Onorato <joeo@android.com>2009-09-28 14:37:53 -0400
committerJoe Onorato <joeo@android.com>2009-09-28 17:34:44 -0400
commit360d0353fdc8ecfcb7131ca0976c9a126b8a0d18 (patch)
treef6177267d79af8394f0c948ae120a8e0bada2a31 /res/raw
parent0a8dc2cd98ddb89ebde88096de8053ad57c45e09 (diff)
downloadandroid_packages_apps_Trebuchet-360d0353fdc8ecfcb7131ca0976c9a126b8a0d18.tar.gz
android_packages_apps_Trebuchet-360d0353fdc8ecfcb7131ca0976c9a126b8a0d18.tar.bz2
android_packages_apps_Trebuchet-360d0353fdc8ecfcb7131ca0976c9a126b8a0d18.zip
Reset rollo to page 0 when it's fully zoomed out.
Diffstat (limited to 'res/raw')
-rw-r--r--res/raw/rollo.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/res/raw/rollo.c b/res/raw/rollo.c
index 0844c97e0..8d0912724 100644
--- a/res/raw/rollo.c
+++ b/res/raw/rollo.c
@@ -92,6 +92,10 @@ void fling() {
//g_Zoom += (maxf(fabsf(g_PosVelocity), 3) - 3) / 2.f;
}
+void touchUp() {
+ g_LastTouchDown = 0;
+}
+
void setZoomTarget() {
g_ZoomTarget = state->zoomTarget;
//debugF("zoom target", g_ZoomTarget);
@@ -320,8 +324,10 @@ main(int launchID)
// Set clear value to dim the background based on the zoom position.
if (g_Zoom < 0.001f) {
pfClearColor(0.0f, 0.0f, 0.0f, 0.0f);
- // Nothing else to do if fully zoomed out.
- g_PosPage = roundf(g_PosPage);
+ // When we're zoomed out and not tracking motion events, reset the pos to 0.
+ if (!g_LastTouchDown) {
+ g_PosPage = 0;
+ }
return 1; // 0;
} else if (g_Zoom < 0.8f) {
pfClearColor(0.0f, 0.0f, 0.0f, g_Zoom);
@@ -329,8 +335,6 @@ main(int launchID)
pfClearColor(0.0f, 0.0f, 0.0f, 0.80f);
}
-
-
// icons & labels
int iconCount = state->iconCount;
g_PageCount = count_pages(iconCount);