summaryrefslogtreecommitdiffstats
path: root/res/raw
diff options
context:
space:
mode:
authorJoe Onorato <joeo@android.com>2009-10-01 21:45:43 -0700
committerJoe Onorato <joeo@android.com>2009-10-01 21:45:43 -0700
commitbcbeab8fc7b8e62a68658f05cc7ce310c64feded (patch)
tree97bc3fbdb43f4b6bf535e0c83a430cac7a764af3 /res/raw
parentfccc8dfc8a442b8d5ea415e1cba7ffde349319d9 (diff)
downloadandroid_packages_apps_Trebuchet-bcbeab8fc7b8e62a68658f05cc7ce310c64feded.tar.gz
android_packages_apps_Trebuchet-bcbeab8fc7b8e62a68658f05cc7ce310c64feded.tar.bz2
android_packages_apps_Trebuchet-bcbeab8fc7b8e62a68658f05cc7ce310c64feded.zip
Put the home button back in.
Diffstat (limited to 'res/raw')
-rw-r--r--res/raw/rollo.c23
1 files changed, 21 insertions, 2 deletions
diff --git a/res/raw/rollo.c b/res/raw/rollo.c
index eb019eec8..01781e2b4 100644
--- a/res/raw/rollo.c
+++ b/res/raw/rollo.c
@@ -275,6 +275,23 @@ draw_page(int icon, int lastIcon, float centerAngle, float scale)
}
}
+void
+draw_home_button()
+{
+ color(1.0f, 1.0f, 1.0f, 1.0f);
+ bindTexture(NAMED_PFTexLinear, 0, params->homeButtonId);
+
+ float scale = 2.0f / SCREEN_WIDTH_PX;
+
+ float x = 0.0f;
+
+ float y = -(SCREEN_HEIGHT_PX / (float)SCREEN_WIDTH_PX);
+ y += g_Zoom * (scale * params->homeButtonTextureHeight / 2);
+
+ float z = 0.0f;
+ drawSprite(x, y, z, params->homeButtonTextureWidth, params->homeButtonTextureHeight);
+}
+
int
main(int launchID)
{
@@ -312,7 +329,7 @@ main(int launchID)
} else if (g_Zoom < 0.85f) {
pfClearColor(0.0f, 0.0f, 0.0f, g_Zoom);
} else {
- pfClearColor(0.0f, 0.0f, 0.0f, 0.85f);
+ pfClearColor(0.0f, 0.0f, 0.0f, g_Zoom);
}
// icons & labels
@@ -362,7 +379,9 @@ main(int launchID)
}
*/
- // Draw the scroll handle ========================================
+ // Draw the home button ========================================
+ draw_home_button();
+
/*
bindTexture(NAMED_PFOrtho, 0, loadI32(ALLOC_PARAMS, PARAM_SCROLL_HANDLE_ID));
float handleLeft = 40 + (320 * (scrollXPx/(float)(maxScrollXPx)));