diff options
author | Joe Onorato <joeo@android.com> | 2009-09-28 14:37:53 -0400 |
---|---|---|
committer | Joe Onorato <joeo@android.com> | 2009-09-28 17:34:44 -0400 |
commit | 360d0353fdc8ecfcb7131ca0976c9a126b8a0d18 (patch) | |
tree | f6177267d79af8394f0c948ae120a8e0bada2a31 /res/raw | |
parent | 0a8dc2cd98ddb89ebde88096de8053ad57c45e09 (diff) | |
download | packages_apps_trebuchet-360d0353fdc8ecfcb7131ca0976c9a126b8a0d18.zip packages_apps_trebuchet-360d0353fdc8ecfcb7131ca0976c9a126b8a0d18.tar.gz packages_apps_trebuchet-360d0353fdc8ecfcb7131ca0976c9a126b8a0d18.tar.bz2 |
Reset rollo to page 0 when it's fully zoomed out.
Diffstat (limited to 'res/raw')
-rw-r--r-- | res/raw/rollo.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/res/raw/rollo.c b/res/raw/rollo.c index 0844c97..8d09127 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); |