v0.7.0: added a version indicator to the main game UI

and debug functionality to the starting scene
This commit is contained in:
Evan Debenham 2018-07-10 23:24:57 -04:00
parent a69cc7a12e
commit 8c89075043
2 changed files with 23 additions and 0 deletions

View File

@ -22,6 +22,7 @@
package com.shatteredpixel.shatteredpixeldungeon.scenes;
import com.shatteredpixel.shatteredpixeldungeon.Assets;
import com.shatteredpixel.shatteredpixeldungeon.BuildConfig;
import com.shatteredpixel.shatteredpixeldungeon.GamesInProgress;
import com.shatteredpixel.shatteredpixeldungeon.SPDSettings;
import com.shatteredpixel.shatteredpixeldungeon.ShatteredPixelDungeon;
@ -122,6 +123,16 @@ public class TitleScene extends PixelScene {
ShatteredPixelDungeon.switchNoFade( StartScene.class );
}
}
@Override
protected boolean onLongClick() {
//making it easier to start runs quickly while debugging
if (BuildConfig.DEBUG) {
TitleScene.this.add( new WndStartGame(1) );
return true;
}
return super.onLongClick();
}
};
add( btnPlay );

View File

@ -73,6 +73,8 @@ public class StatusPane extends Component {
private MenuButton btnMenu;
private Toolbar.PickedUpItem pickedUp;
private BitmapText version;
@Override
protected void createChildren() {
@ -135,6 +137,10 @@ public class StatusPane extends Component {
add( buffs );
add( pickedUp = new Toolbar.PickedUpItem());
version = new BitmapText( "v" + Game.version, PixelScene.pixelFont);
version.hardlight( 0xCCCCCC );
add(version);
}
@Override
@ -168,6 +174,12 @@ public class StatusPane extends Component {
btnJournal.setPos( width - 42, 1 );
btnMenu.setPos( width - btnMenu.width(), 1 );
version.scale.set(PixelScene.align(0.5f));
version.measure();
version.x = width - version.width();
version.y = btnMenu.bottom() + (4 - version.baseLine());
PixelScene.align(version);
}
private static final int[] warningColors = new int[]{0x660000, 0xCC0000, 0x660000};