v0.6.4: pressing 'new game' from game window now shows hero select
This commit is contained in:
parent
ca3393cf33
commit
9d5e814aea
|
@ -22,6 +22,7 @@
|
||||||
package com.shatteredpixel.shatteredpixeldungeon.windows;
|
package com.shatteredpixel.shatteredpixeldungeon.windows;
|
||||||
|
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
||||||
|
import com.shatteredpixel.shatteredpixeldungeon.GamesInProgress;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.SPDSettings;
|
import com.shatteredpixel.shatteredpixeldungeon.SPDSettings;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.ShatteredPixelDungeon;
|
import com.shatteredpixel.shatteredpixeldungeon.ShatteredPixelDungeon;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
||||||
|
@ -29,7 +30,6 @@ import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.scenes.InterlevelScene;
|
import com.shatteredpixel.shatteredpixeldungeon.scenes.InterlevelScene;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.scenes.RankingsScene;
|
import com.shatteredpixel.shatteredpixeldungeon.scenes.RankingsScene;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.scenes.TitleScene;
|
import com.shatteredpixel.shatteredpixeldungeon.scenes.TitleScene;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.ui.Icons;
|
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.ui.RedButton;
|
import com.shatteredpixel.shatteredpixeldungeon.ui.RedButton;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.ui.Window;
|
import com.shatteredpixel.shatteredpixeldungeon.ui.Window;
|
||||||
import com.watabou.noosa.Game;
|
import com.watabou.noosa.Game;
|
||||||
|
@ -74,14 +74,12 @@ public class WndGame extends Window {
|
||||||
addButton( btnStart = new RedButton( Messages.get(this, "start") ) {
|
addButton( btnStart = new RedButton( Messages.get(this, "start") ) {
|
||||||
@Override
|
@Override
|
||||||
protected void onClick() {
|
protected void onClick() {
|
||||||
Dungeon.hero = null;
|
GamesInProgress.selectedClass = Dungeon.hero.heroClass;
|
||||||
SPDSettings.challenges( Dungeon.challenges );
|
|
||||||
InterlevelScene.mode = InterlevelScene.Mode.DESCEND;
|
|
||||||
InterlevelScene.noStory = true;
|
InterlevelScene.noStory = true;
|
||||||
Game.switchScene( InterlevelScene.class );
|
ShatteredPixelDungeon.scene().add(new WndStartGame(GamesInProgress.firstEmpty()));
|
||||||
}
|
}
|
||||||
} );
|
} );
|
||||||
btnStart.icon( Icons.get( Dungeon.hero.heroClass ) );
|
btnStart.textColor(Window.TITLE_COLOR);
|
||||||
|
|
||||||
addButton( new RedButton( Messages.get(this, "rankings") ) {
|
addButton( new RedButton( Messages.get(this, "rankings") ) {
|
||||||
@Override
|
@Override
|
||||||
|
@ -126,7 +124,7 @@ public class WndGame extends Window {
|
||||||
hide();
|
hide();
|
||||||
}
|
}
|
||||||
} );
|
} );
|
||||||
|
|
||||||
resize( WIDTH, pos );
|
resize( WIDTH, pos );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user