cleaned up formatting:

- removed trailing whitespace
- changed all leading whitespace to tabs
- removed IDE created author comments
This commit is contained in:
Evan Debenham
2015-06-12 16:22:26 -04:00
parent baa83b7e43
commit cebdff0221
335 changed files with 8555 additions and 8714 deletions
@@ -28,64 +28,64 @@ import com.shatteredpixel.shatteredpixeldungeon.ui.Window;
public class WndChallenges extends Window {
private static final int WIDTH = 108;
private static final int WIDTH = 108;
private static final int TTL_HEIGHT = 12;
private static final int BTN_HEIGHT = 18;
private static final int GAP = 1;
private static final String TITLE = "Challenges";
private static final String TITLE = "Challenges";
private boolean editable;
private ArrayList<CheckBox> boxes;
private boolean editable;
private ArrayList<CheckBox> boxes;
public WndChallenges( int checked, boolean editable ) {
public WndChallenges( int checked, boolean editable ) {
super();
super();
this.editable = editable;
this.editable = editable;
BitmapText title = PixelScene.createText( TITLE, 9 );
title.hardlight( TITLE_COLOR );
title.measure();
title.x = PixelScene.align( camera, (WIDTH - title.width()) / 2 );
title.y = PixelScene.align( camera, (TTL_HEIGHT - title.height()) / 2 );
add( title );
BitmapText title = PixelScene.createText( TITLE, 9 );
title.hardlight( TITLE_COLOR );
title.measure();
title.x = PixelScene.align( camera, (WIDTH - title.width()) / 2 );
title.y = PixelScene.align( camera, (TTL_HEIGHT - title.height()) / 2 );
add( title );
boxes = new ArrayList<CheckBox>();
boxes = new ArrayList<CheckBox>();
float pos = TTL_HEIGHT;
for (int i=0; i < Challenges.NAMES.length; i++) {
float pos = TTL_HEIGHT;
for (int i=0; i < Challenges.NAMES.length; i++) {
CheckBox cb = new CheckBox( Challenges.NAMES[i] );
cb.checked( (checked & Challenges.MASKS[i]) != 0 );
cb.active = editable;
CheckBox cb = new CheckBox( Challenges.NAMES[i] );
cb.checked( (checked & Challenges.MASKS[i]) != 0 );
cb.active = editable;
if (i > 0) {
pos += GAP;
}
cb.setRect( 0, pos, WIDTH, BTN_HEIGHT );
pos = cb.bottom();
if (i > 0) {
pos += GAP;
}
cb.setRect( 0, pos, WIDTH, BTN_HEIGHT );
pos = cb.bottom();
add( cb );
boxes.add( cb );
}
add( cb );
boxes.add( cb );
}
resize( WIDTH, (int)pos );
}
resize( WIDTH, (int)pos );
}
@Override
public void onBackPressed() {
@Override
public void onBackPressed() {
if (editable) {
int value = 0;
for (int i=0; i < boxes.size(); i++) {
if (boxes.get( i ).checked()) {
value |= Challenges.MASKS[i];
}
}
ShatteredPixelDungeon.challenges( value );
}
if (editable) {
int value = 0;
for (int i=0; i < boxes.size(); i++) {
if (boxes.get( i ).checked()) {
value |= Challenges.MASKS[i];
}
}
ShatteredPixelDungeon.challenges( value );
}
super.onBackPressed();
}
super.onBackPressed();
}
}