v0.7.0: updated automatically assigning active journal tab functionality

This commit is contained in:
Evan Debenham 2018-10-12 23:13:36 -04:00
parent 53121dd01b
commit b419e62b8a
3 changed files with 7 additions and 3 deletions

View File

@ -53,7 +53,11 @@ public abstract class DocumentPage extends Item {
public final boolean doPickUp(Hero hero) { public final boolean doPickUp(Hero hero) {
GameScene.pickUpJournal(this, hero.pos); GameScene.pickUpJournal(this, hero.pos);
GameScene.flashJournal(); GameScene.flashJournal();
if (document() == Document.ALCHEMY_GUIDE){
WndJournal.last_index = 1;
} else {
WndJournal.last_index = 0; WndJournal.last_index = 0;
}
document().addPage(page); document().addPage(page);
Sample.INSTANCE.play( Assets.SND_ITEM ); Sample.INSTANCE.play( Assets.SND_ITEM );
hero.spendAndNext( TIME_TO_PICK_UP ); hero.spendAndNext( TIME_TO_PICK_UP );

View File

@ -49,7 +49,7 @@ public abstract class Key extends Item {
@Override @Override
public boolean doPickUp(Hero hero) { public boolean doPickUp(Hero hero) {
GameScene.pickUpJournal(this, hero.pos); GameScene.pickUpJournal(this, hero.pos);
WndJournal.last_index = 1; WndJournal.last_index = 2;
Notes.add(this); Notes.add(this);
Sample.INSTANCE.play( Assets.SND_ITEM ); Sample.INSTANCE.play( Assets.SND_ITEM );
hero.spendAndNext( TIME_TO_PICK_UP ); hero.spendAndNext( TIME_TO_PICK_UP );

View File

@ -127,7 +127,7 @@ public class Toolbar extends Component {
@Override @Override
protected boolean onLongClick() { protected boolean onLongClick() {
WndJournal.last_index = 2; //catalog page WndJournal.last_index = 3; //catalog page
GameScene.show(new WndJournal()); GameScene.show(new WndJournal());
return true; return true;
} }