Revision 83018ac4
Added by Leszek Koltunski almost 2 years ago
src/main/java/org/distorted/screens/RubikScreenPlay.java | ||
---|---|---|
509 | 509 |
private void setupLevelColors(RubikActivity act) |
510 | 510 |
{ |
511 | 511 |
int currObject = RubikObjectList.getCurrObject(); |
512 |
int dbLevel = RubikObjectList.getDBLevel(currObject); |
|
513 | 512 |
RubikScores scores = RubikScores.getInstance(); |
514 | 513 |
Resources res = act.getResources(); |
515 | 514 |
ColorStateList colorG = ColorStateList.valueOf(res.getColor(R.color.green)); |
516 | 515 |
ColorStateList colorD = ColorStateList.valueOf(res.getColor(R.color.dark_grey)); |
517 | 516 |
|
518 |
for(int i=0; i<=LEVELS_SHOWN; i++)
|
|
517 |
for(int level=0; level<=LEVELS_SHOWN; level++)
|
|
519 | 518 |
{ |
520 |
int level = i<LEVELS_SHOWN ? i : dbLevel; |
|
521 | 519 |
boolean isSolved = scores.isSolved(currObject,level); |
522 |
mLevel[i].setBackgroundTintList( isSolved ? colorG : colorD);
|
|
520 |
mLevel[level].setBackgroundTintList( isSolved ? colorG : colorD);
|
|
523 | 521 |
} |
524 | 522 |
} |
525 | 523 |
|
Also available in: Unified diff
Correct the MAX level in the leaderboard.