v0.8.2: cleaned up a really nasty double ternary statement in rankings
This commit is contained in:
parent
31a010d1dd
commit
cc8f85b7b3
|
@ -93,12 +93,10 @@ public class RankingsScene extends PixelScene {
|
||||||
|
|
||||||
for (Rankings.Record rec : Rankings.INSTANCE.records) {
|
for (Rankings.Record rec : Rankings.INSTANCE.records) {
|
||||||
Record row = new Record( pos, pos == Rankings.INSTANCE.lastRecord, rec );
|
Record row = new Record( pos, pos == Rankings.INSTANCE.lastRecord, rec );
|
||||||
float offset =
|
float offset = 0;
|
||||||
rowHeight <= 14 ?
|
if (rowHeight <= 14){
|
||||||
pos %2 == 1?
|
offset = (pos % 2 == 1) ? 5 : -5;
|
||||||
5 :
|
}
|
||||||
-5
|
|
||||||
: 0;
|
|
||||||
row.setRect( left+offset, top + pos * rowHeight, w - left * 2, rowHeight );
|
row.setRect( left+offset, top + pos * rowHeight, w - left * 2, rowHeight );
|
||||||
add(row);
|
add(row);
|
||||||
|
|
||||||
|
@ -186,8 +184,6 @@ public class RankingsScene extends PixelScene {
|
||||||
|
|
||||||
desc.text( Messages.titleCase(rec.desc()) );
|
desc.text( Messages.titleCase(rec.desc()) );
|
||||||
|
|
||||||
//desc.measure();
|
|
||||||
|
|
||||||
int odd = pos % 2;
|
int odd = pos % 2;
|
||||||
|
|
||||||
if (rec.win) {
|
if (rec.win) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user