Merge change 20207

* changes:
  Implement basic snapping.
This commit is contained in:
Android (Google) Code Review
2009-08-05 17:36:07 -07:00
3 changed files with 3 additions and 14 deletions

View File

@@ -61,6 +61,7 @@ int main(void* con, int ft, int launchID)
storeF(2, SCRATCH_ZOOM, zoom);
float targetRot = loadI32(0, STATE_FIRST_VISIBLE) / 180.0f * 3.14f;
targetRot = targetRot * 0.80f - .12f;
float drawRot = filter(loadF(2, SCRATCH_ROT), targetRot, 0.1f * touchCut);
storeF(2, SCRATCH_ROT, drawRot);

View File

@@ -264,20 +264,6 @@ public class RolloRS {
mLabels[27] = mLabels[8];
mLabels[28] = mLabels[9];
/*
mIcons[19] = Allocation.createFromBitmapResource(mRS, mRes, R.raw.solitaire, ie8888, true);
mIcons[20] = Allocation.createFromBitmapResource(mRS, mRes, R.raw.sudoku, ie8888, true);
mIcons[21] = Allocation.createFromBitmapResource(mRS, mRes, R.raw.taptaprevenge, ie8888, true);
mIcons[22] = Allocation.createFromBitmapResource(mRS, mRes, R.raw.tetris, ie8888, true);
mIcons[23] = Allocation.createFromBitmapResource(mRS, mRes, R.raw.tictactoe, ie8888, true);
mIcons[24] = Allocation.createFromBitmapResource(mRS, mRes, R.raw.tweetie, ie8888, true);
mIcons[25] = Allocation.createFromBitmapResource(mRS, mRes, R.raw.urbanspoon, ie8888, true);
mIcons[26] = Allocation.createFromBitmapResource(mRS, mRes, R.raw.waterslide_extreme, ie8888, true);
mIcons[27] = Allocation.createFromBitmapResource(mRS, mRes, R.raw.weather_channel, ie8888, true);
mIcons[28] = Allocation.createFromBitmapResource(mRS, mRes, R.raw.zippo, ie8888, true);
*/
for(int ct=0; ct < mIcons.length; ct++) {
mIcons[ct].uploadToTexture(0);
mLabels[ct].uploadToTexture(0);

View File

@@ -187,6 +187,8 @@ public class RolloView extends RSSurfaceView {
mFlingY = ny;
} else {
mFlingMode = false;
mColumn = (float)(java.lang.Math.floor(mColumn * 0.25f + 0.3f) * 4.f) + 1.f;
setColumn(true);
}
}