diff options
author | Jason Sams <rjsams@android.com> | 2009-09-30 17:32:05 -0700 |
---|---|---|
committer | Jason Sams <rjsams@android.com> | 2009-09-30 17:40:11 -0700 |
commit | 28870b75a705403e9a19ef8fedc1fd8906e31870 (patch) | |
tree | a63549f073f4713d15e68c5201991a772863a9b2 /res/raw | |
parent | 4f3bdc2e66cd2cc64fb37dd5de0403a796b87ded (diff) | |
download | android_packages_apps_Trebuchet-28870b75a705403e9a19ef8fedc1fd8906e31870.tar.gz android_packages_apps_Trebuchet-28870b75a705403e9a19ef8fedc1fd8906e31870.tar.bz2 android_packages_apps_Trebuchet-28870b75a705403e9a19ef8fedc1fd8906e31870.zip |
Minor tweaks to look. Billboarded icons and 1:1 text.
Diffstat (limited to 'res/raw')
-rw-r--r-- | res/raw/rollo.c | 35 |
1 files changed, 12 insertions, 23 deletions
diff --git a/res/raw/rollo.c b/res/raw/rollo.c index 58623730e..eb019eec8 100644 --- a/res/raw/rollo.c +++ b/res/raw/rollo.c @@ -65,6 +65,7 @@ void move() { } g_LastTouchDown = state->newTouchDown; g_LastPositionX = state->newPositionX; + //debugF("Move P", g_PosPage); } void fling() { @@ -89,6 +90,7 @@ void fling() { if (g_PosPage > (g_PageCount - 1)) { g_PosVelocity = minf(0, g_PosVelocity); } + //debugF("fling v", g_PosVelocity); } void touchUp() { @@ -210,10 +212,7 @@ draw_page(int icon, int lastIcon, float centerAngle, float scale) float farIconTextureSize = far_size(2 * ICON_TEXTURE_WIDTH_PX / (float)SCREEN_WIDTH_PX); float normalizedLabelWidth = 2 * params->bubbleWidth / (float)SCREEN_WIDTH_PX; - float farLabelWidth = far_size(normalizedLabelWidth); float farLabelHeight = far_size(params->bubbleHeight * (normalizedLabelWidth / params->bubbleWidth)); - float labelTextureWidth = (float)params->bubbleWidth / params->bubbleBitmapWidth; - float labelTextureHeight = (float)params->bubbleHeight / params->bubbleBitmapHeight; for (row=0; row<ROWS_PER_PAGE && icon<=lastIcon; row++) { float angle = centerAngle; @@ -223,9 +222,7 @@ draw_page(int icon, int lastIcon, float centerAngle, float scale) - row * (farIconSize + iconGutterHeight); float iconBottom = iconTop - farIconSize; - float labelTop = iconBottom - (.1 * farLabelHeight); - float labelBottom = labelTop - farLabelHeight; - + float labelY = iconBottom - farLabelHeight; float iconTextureTop = iconTop + (0.5f * (farIconTextureSize - farIconSize)); float iconTextureBottom = iconTextureTop - farIconTextureSize; @@ -241,10 +238,10 @@ draw_page(int icon, int lastIcon, float centerAngle, float scale) centerX *= scale; } - float iconLeftX = centerX - (cosine * farIconTextureSize * .5); - float iconRightX = centerX + (cosine * farIconTextureSize * .5); - float iconLeftZ = centerZ + (sine * farIconTextureSize * .5); - float iconRightZ = centerZ - (sine * farIconTextureSize * .5); + float iconLeftX = centerX - (/*cosine * */ farIconTextureSize * .5); + float iconRightX = centerX + (/*cosine * */ farIconTextureSize * .5); + float iconLeftZ = centerZ;// + (sine * farIconTextureSize * .5); + float iconRightZ = centerZ;// - (sine * farIconTextureSize * .5); color(1.0f, 1.0f, 1.0f, 0.99f); if (state->selectedIconIndex == icon) { @@ -265,19 +262,11 @@ draw_page(int icon, int lastIcon, float centerAngle, float scale) // label if (scale < 1.2f) { - float a = maxf(scale, 1.0f); - a = (1.2f - a) * 5; + float a = (1.2f - maxf(scale, 1.0f)) * 5; color(1.0f, 1.0f, 1.0f, a); - - float labelLeftX = centerX - farLabelWidth * 0.5f; - float labelRightX = centerX + farLabelWidth * 0.5f; - bindTexture(NAMED_PFTexLinear, 0, loadI32(ALLOC_LABEL_IDS, icon)); - drawQuadTexCoords( - labelLeftX, labelTop, centerZ, 0.0f, 0.0f, - labelRightX, labelTop, centerZ, labelTextureWidth, 0.0f, - labelRightX, labelBottom, centerZ, labelTextureWidth, labelTextureHeight, - labelLeftX, labelBottom, centerZ, 0.0f, labelTextureHeight); + drawSprite(centerX, labelY, centerZ, + params->bubbleBitmapWidth, params->bubbleBitmapHeight); } angle += columnGutterAngle + iconWidthAngle; @@ -320,10 +309,10 @@ main(int launchID) g_PosPage = 0; } return 1; // 0; - } else if (g_Zoom < 0.8f) { + } else if (g_Zoom < 0.85f) { pfClearColor(0.0f, 0.0f, 0.0f, g_Zoom); } else { - pfClearColor(0.0f, 0.0f, 0.0f, 0.80f); + pfClearColor(0.0f, 0.0f, 0.0f, 0.85f); } // icons & labels |