v2.5.0: various UI/UX improvements to the journal and guidebook
This commit is contained in:
Binary file not shown.
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 404 B After Width: | Height: | Size: 406 B |
@@ -620,7 +620,9 @@ items.journal.alchemypage.name=torn alchemy book page
|
|||||||
items.journal.alchemypage.desc=A torn page from a guidebook on alchemy.\n\nMost of the text is too small to read at a distance, but you can make out the title of the page:\n\n_"%s"_
|
items.journal.alchemypage.desc=A torn page from a guidebook on alchemy.\n\nMost of the text is too small to read at a distance, but you can make out the title of the page:\n\n_"%s"_
|
||||||
|
|
||||||
items.journal.guidebook.name=tome of dungeon mastery
|
items.journal.guidebook.name=tome of dungeon mastery
|
||||||
items.journal.guidebook.hint=Your guidebook has advice for you!
|
items.journal.guidebook.hint_mobile=Your guidebook has advice for you! Tap the blinking journal button to read it.
|
||||||
|
items.journal.guidebook.hint_desktop=Your guidebook has advice for you! Select the blinking journal button (%s) to read it.
|
||||||
|
items.journal.guidebook.hint_status=Guidebook
|
||||||
items.journal.guidebook.desc=An adventurer's guidebook, left here by someone who decided adventuring wasn't for them! This particular book is magical, and can prompt adventurers to read a page at the right moment.\n\nDespite that functionality, the book is most popular because of the big words "Don't Panic!" written in large friendly letters on the cover.
|
items.journal.guidebook.desc=An adventurer's guidebook, left here by someone who decided adventuring wasn't for them! This particular book is magical, and can prompt adventurers to read a page at the right moment.\n\nDespite that functionality, the book is most popular because of the big words "Don't Panic!" written in large friendly letters on the cover.
|
||||||
|
|
||||||
items.journal.guidepage.name=torn guidebook page
|
items.journal.guidepage.name=torn guidebook page
|
||||||
|
|||||||
@@ -112,7 +112,7 @@ windows.wndinfotalent.upgrade=Upgrade Talent
|
|||||||
|
|
||||||
windows.wndinfotrap.inactive=This trap is inactive, and can no longer be triggered.
|
windows.wndinfotrap.inactive=This trap is inactive, and can no longer be triggered.
|
||||||
|
|
||||||
windows.wndjournal$guidetab.title=Tome of Dungeon Mastery
|
windows.wndjournal$guidetab.title=Dungeon Guide
|
||||||
windows.wndjournal$alchemytab.title=Alchemy Guide
|
windows.wndjournal$alchemytab.title=Alchemy Guide
|
||||||
windows.wndjournal$guidetab.missing=page missing
|
windows.wndjournal$guidetab.missing=page missing
|
||||||
windows.wndjournal$notestab.title=Adventuring Notes
|
windows.wndjournal$notestab.title=Adventuring Notes
|
||||||
|
|||||||
@@ -25,7 +25,6 @@ import com.shatteredpixel.shatteredpixeldungeon.Badges;
|
|||||||
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.SPDSettings;
|
import com.shatteredpixel.shatteredpixeldungeon.SPDSettings;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.items.journal.Guidebook;
|
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.exotic.ScrollOfChallenge;
|
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.exotic.ScrollOfChallenge;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.journal.Document;
|
import com.shatteredpixel.shatteredpixeldungeon.journal.Document;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
||||||
@@ -100,7 +99,6 @@ public class Hunger extends Buff implements Hero.Doom {
|
|||||||
GLog.w( Messages.get(this, "onhungry") );
|
GLog.w( Messages.get(this, "onhungry") );
|
||||||
|
|
||||||
if (!Document.ADVENTURERS_GUIDE.isPageRead(Document.GUIDE_FOOD)){
|
if (!Document.ADVENTURERS_GUIDE.isPageRead(Document.GUIDE_FOOD)){
|
||||||
GLog.p(Messages.get(Guidebook.class, "hint"));
|
|
||||||
GameScene.flashForDocument(Document.ADVENTURERS_GUIDE, Document.GUIDE_FOOD);
|
GameScene.flashForDocument(Document.ADVENTURERS_GUIDE, Document.GUIDE_FOOD);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1534,7 +1534,6 @@ public class Hero extends Char {
|
|||||||
}
|
}
|
||||||
if (m instanceof Snake && Dungeon.level.distance(m.pos, pos) <= 4
|
if (m instanceof Snake && Dungeon.level.distance(m.pos, pos) <= 4
|
||||||
&& !Document.ADVENTURERS_GUIDE.isPageRead(Document.GUIDE_EXAMINING)){
|
&& !Document.ADVENTURERS_GUIDE.isPageRead(Document.GUIDE_EXAMINING)){
|
||||||
GLog.p(Messages.get(Guidebook.class, "hint"));
|
|
||||||
GameScene.flashForDocument(Document.ADVENTURERS_GUIDE, Document.GUIDE_EXAMINING);
|
GameScene.flashForDocument(Document.ADVENTURERS_GUIDE, Document.GUIDE_EXAMINING);
|
||||||
//we set to read here to prevent this message popping up a bunch
|
//we set to read here to prevent this message popping up a bunch
|
||||||
Document.ADVENTURERS_GUIDE.readPage(Document.GUIDE_EXAMINING);
|
Document.ADVENTURERS_GUIDE.readPage(Document.GUIDE_EXAMINING);
|
||||||
|
|||||||
@@ -63,7 +63,6 @@ public class Snake extends Mob {
|
|||||||
dodges++;
|
dodges++;
|
||||||
if ((dodges >= 2 && !Document.ADVENTURERS_GUIDE.isPageRead(Document.GUIDE_SURPRISE_ATKS))
|
if ((dodges >= 2 && !Document.ADVENTURERS_GUIDE.isPageRead(Document.GUIDE_SURPRISE_ATKS))
|
||||||
|| (dodges >= 4 && !Badges.isUnlocked(Badges.Badge.BOSS_SLAIN_1))){
|
|| (dodges >= 4 && !Badges.isUnlocked(Badges.Badge.BOSS_SLAIN_1))){
|
||||||
GLog.p(Messages.get(Guidebook.class, "hint"));
|
|
||||||
GameScene.flashForDocument(Document.ADVENTURERS_GUIDE, Document.GUIDE_SURPRISE_ATKS);
|
GameScene.flashForDocument(Document.ADVENTURERS_GUIDE, Document.GUIDE_SURPRISE_ATKS);
|
||||||
dodges = 0;
|
dodges = 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -56,7 +56,6 @@ public abstract class EquipableItem extends Item {
|
|||||||
public boolean doPickUp(Hero hero, int pos) {
|
public boolean doPickUp(Hero hero, int pos) {
|
||||||
if (super.doPickUp(hero, pos)){
|
if (super.doPickUp(hero, pos)){
|
||||||
if (!isIdentified() && !Document.ADVENTURERS_GUIDE.isPageRead(Document.GUIDE_IDING)){
|
if (!isIdentified() && !Document.ADVENTURERS_GUIDE.isPageRead(Document.GUIDE_IDING)){
|
||||||
GLog.p(Messages.get(Guidebook.class, "hint"));
|
|
||||||
GameScene.flashForDocument(Document.ADVENTURERS_GUIDE, Document.GUIDE_IDING);
|
GameScene.flashForDocument(Document.ADVENTURERS_GUIDE, Document.GUIDE_IDING);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
+6
-3
@@ -53,11 +53,14 @@ public abstract class DocumentPage extends Item {
|
|||||||
public final boolean doPickUp(Hero hero, int pos) {
|
public final boolean doPickUp(Hero hero, int pos) {
|
||||||
GameScene.pickUpJournal(this, pos);
|
GameScene.pickUpJournal(this, pos);
|
||||||
GameScene.flashForDocument(document(), page());
|
GameScene.flashForDocument(document(), page());
|
||||||
if (document() == Document.ALCHEMY_GUIDE){
|
if (document() == Document.ADVENTURERS_GUIDE){
|
||||||
WndJournal.last_index = 1;
|
WndJournal.last_index = 1;
|
||||||
|
} else if (document() == Document.ALCHEMY_GUIDE) {
|
||||||
|
WndJournal.last_index = 2;
|
||||||
WndJournal.AlchemyTab.currentPageIdx = document().pageIdx(page());
|
WndJournal.AlchemyTab.currentPageIdx = document().pageIdx(page());
|
||||||
} else {
|
} else if (document().isLoreDoc()){
|
||||||
WndJournal.last_index = 0;
|
WndJournal.last_index = 3;
|
||||||
|
WndJournal.CatalogTab.currentItemIdx = 3;
|
||||||
}
|
}
|
||||||
document().findPage(page);
|
document().findPage(page);
|
||||||
Sample.INSTANCE.play( Assets.Sounds.ITEM );
|
Sample.INSTANCE.play( Assets.Sounds.ITEM );
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ public abstract class Key extends Item {
|
|||||||
public boolean doPickUp(Hero hero, int pos) {
|
public boolean doPickUp(Hero hero, int pos) {
|
||||||
Catalog.setSeen(getClass());
|
Catalog.setSeen(getClass());
|
||||||
GameScene.pickUpJournal(this, pos);
|
GameScene.pickUpJournal(this, pos);
|
||||||
WndJournal.last_index = 2;
|
WndJournal.last_index = 0;
|
||||||
Notes.add(this);
|
Notes.add(this);
|
||||||
Sample.INSTANCE.play( Assets.Sounds.ITEM );
|
Sample.INSTANCE.play( Assets.Sounds.ITEM );
|
||||||
hero.spendAndNext( TIME_TO_PICK_UP );
|
hero.spendAndNext( TIME_TO_PICK_UP );
|
||||||
|
|||||||
-1
@@ -70,7 +70,6 @@ public class TrinketCatalyst extends Item {
|
|||||||
public boolean doPickUp(Hero hero, int pos) {
|
public boolean doPickUp(Hero hero, int pos) {
|
||||||
if (super.doPickUp(hero, pos)){
|
if (super.doPickUp(hero, pos)){
|
||||||
if (!Document.ADVENTURERS_GUIDE.isPageRead(Document.GUIDE_ALCHEMY)){
|
if (!Document.ADVENTURERS_GUIDE.isPageRead(Document.GUIDE_ALCHEMY)){
|
||||||
GLog.p(Messages.get(Guidebook.class, "hint"));
|
|
||||||
GameScene.flashForDocument(Document.ADVENTURERS_GUIDE, Document.GUIDE_ALCHEMY);
|
GameScene.flashForDocument(Document.ADVENTURERS_GUIDE, Document.GUIDE_ALCHEMY);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@@ -596,7 +596,6 @@ public class GameScene extends PixelScene {
|
|||||||
if (!SPDSettings.intro() &&
|
if (!SPDSettings.intro() &&
|
||||||
Rankings.INSTANCE.totalNumber > 0 &&
|
Rankings.INSTANCE.totalNumber > 0 &&
|
||||||
!Document.ADVENTURERS_GUIDE.isPageRead(Document.GUIDE_DIEING)){
|
!Document.ADVENTURERS_GUIDE.isPageRead(Document.GUIDE_DIEING)){
|
||||||
GLog.p(Messages.get(Guidebook.class, "hint"));
|
|
||||||
GameScene.flashForDocument(Document.ADVENTURERS_GUIDE, Document.GUIDE_DIEING);
|
GameScene.flashForDocument(Document.ADVENTURERS_GUIDE, Document.GUIDE_DIEING);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1102,6 +1101,16 @@ public class GameScene extends PixelScene {
|
|||||||
|
|
||||||
public static void flashForDocument( Document doc, String page ){
|
public static void flashForDocument( Document doc, String page ){
|
||||||
if (scene != null) {
|
if (scene != null) {
|
||||||
|
if (doc == Document.ADVENTURERS_GUIDE){
|
||||||
|
if (!page.equals(Document.GUIDE_INTRO)) {
|
||||||
|
if (SPDSettings.interfaceSize() == 0) {
|
||||||
|
GLog.p(Messages.get(Guidebook.class, "hint_mobile"));
|
||||||
|
} else {
|
||||||
|
GLog.p(Messages.get(Guidebook.class, "hint_desktop", KeyBindings.getKeyName(KeyBindings.getFirstKeyForAction(SPDAction.JOURNAL, ControllerHandler.isControllerConnected()))));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Dungeon.hero.sprite.showStatus(CharSprite.POSITIVE, Messages.get(Guidebook.class, "hint_status"));
|
||||||
|
}
|
||||||
scene.menu.flashForPage( doc, page );
|
scene.menu.flashForPage( doc, page );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1539,7 +1548,6 @@ public class GameScene extends PixelScene {
|
|||||||
} else if ( o instanceof Mob && ((Mob) o).isActive() ){
|
} else if ( o instanceof Mob && ((Mob) o).isActive() ){
|
||||||
GameScene.show(new WndInfoMob((Mob) o));
|
GameScene.show(new WndInfoMob((Mob) o));
|
||||||
if (o instanceof Snake && !Document.ADVENTURERS_GUIDE.isPageRead(Document.GUIDE_SURPRISE_ATKS)){
|
if (o instanceof Snake && !Document.ADVENTURERS_GUIDE.isPageRead(Document.GUIDE_SURPRISE_ATKS)){
|
||||||
GLog.p(Messages.get(Guidebook.class, "hint"));
|
|
||||||
GameScene.flashForDocument(Document.ADVENTURERS_GUIDE, Document.GUIDE_SURPRISE_ATKS);
|
GameScene.flashForDocument(Document.ADVENTURERS_GUIDE, Document.GUIDE_SURPRISE_ATKS);
|
||||||
}
|
}
|
||||||
} else if ( o instanceof Heap && !((Heap) o).isEmpty() ){
|
} else if ( o instanceof Heap && !((Heap) o).isEmpty() ){
|
||||||
|
|||||||
@@ -39,6 +39,7 @@ public enum Icons {
|
|||||||
CHANGES,
|
CHANGES,
|
||||||
PREFS,
|
PREFS,
|
||||||
SHPX,
|
SHPX,
|
||||||
|
JOURNAL,
|
||||||
|
|
||||||
//rankings and hero select icons, spacing for 16x16
|
//rankings and hero select icons, spacing for 16x16
|
||||||
STAIRS,
|
STAIRS,
|
||||||
@@ -86,6 +87,7 @@ public enum Icons {
|
|||||||
COPY,
|
COPY,
|
||||||
PASTE,
|
PASTE,
|
||||||
CATALOG,
|
CATALOG,
|
||||||
|
ALCHEMY,
|
||||||
COIN_SML,
|
COIN_SML,
|
||||||
ENERGY_SML,
|
ENERGY_SML,
|
||||||
BACKPACK,
|
BACKPACK,
|
||||||
@@ -154,6 +156,9 @@ public enum Icons {
|
|||||||
case SHPX:
|
case SHPX:
|
||||||
icon.frame( icon.texture.uvRectBySize( 119, 0, 16, 16 ) );
|
icon.frame( icon.texture.uvRectBySize( 119, 0, 16, 16 ) );
|
||||||
break;
|
break;
|
||||||
|
case JOURNAL:
|
||||||
|
icon.frame( icon.texture.uvRectBySize( 136, 0, 17, 16 ) );
|
||||||
|
break;
|
||||||
|
|
||||||
case STAIRS:
|
case STAIRS:
|
||||||
icon.frame( icon.texture.uvRectBySize( 0, 16, 13, 16 ) );
|
icon.frame( icon.texture.uvRectBySize( 0, 16, 13, 16 ) );
|
||||||
@@ -283,6 +288,9 @@ public enum Icons {
|
|||||||
case CATALOG:
|
case CATALOG:
|
||||||
icon.frame( icon.texture.uvRectBySize( 240, 64, 13, 16 ) );
|
icon.frame( icon.texture.uvRectBySize( 240, 64, 13, 16 ) );
|
||||||
break;
|
break;
|
||||||
|
case ALCHEMY:
|
||||||
|
icon.frame( icon.texture.uvRectBySize( 224, 64, 16, 16 ) );
|
||||||
|
break;
|
||||||
case COIN_SML:
|
case COIN_SML:
|
||||||
icon.frame( icon.texture.uvRectBySize( 192, 80, 7, 7 ) );
|
icon.frame( icon.texture.uvRectBySize( 192, 80, 7, 7 ) );
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -234,7 +234,7 @@ public class MenuPane extends Component {
|
|||||||
bg = new Image( Assets.Interfaces.MENU_BTN, 2, 2, 13, 11 );
|
bg = new Image( Assets.Interfaces.MENU_BTN, 2, 2, 13, 11 );
|
||||||
add( bg );
|
add( bg );
|
||||||
|
|
||||||
journalIcon = new Image( Assets.Interfaces.MENU_BTN, 31, 0, 11, 7);
|
journalIcon = new Image( Assets.Interfaces.MENU_BTN, 31, 0, 11, 6);
|
||||||
add( journalIcon );
|
add( journalIcon );
|
||||||
|
|
||||||
keyIcon = new KeyDisplay();
|
keyIcon = new KeyDisplay();
|
||||||
@@ -308,9 +308,15 @@ public class MenuPane extends Component {
|
|||||||
keyIcon.am = journalIcon.am = 1;
|
keyIcon.am = journalIcon.am = 1;
|
||||||
if (flashingPage != null){
|
if (flashingPage != null){
|
||||||
if (flashingDoc == Document.ALCHEMY_GUIDE){
|
if (flashingDoc == Document.ALCHEMY_GUIDE){
|
||||||
WndJournal.last_index = 1;
|
WndJournal.last_index = 2;
|
||||||
GameScene.show( new WndJournal() );
|
GameScene.show( new WndJournal() );
|
||||||
} else if (flashingDoc.pageNames().contains(flashingPage)){
|
} else if (flashingDoc.pageNames().contains(flashingPage)){
|
||||||
|
if (flashingDoc == Document.ADVENTURERS_GUIDE){
|
||||||
|
WndJournal.last_index = 1;
|
||||||
|
} else if (flashingDoc.isLoreDoc()){
|
||||||
|
WndJournal.last_index = 3;
|
||||||
|
WndJournal.CatalogTab.currentItemIdx = 3;
|
||||||
|
}
|
||||||
GameScene.show( new WndStory( flashingDoc.pageSprite(flashingPage),
|
GameScene.show( new WndStory( flashingDoc.pageSprite(flashingPage),
|
||||||
flashingDoc.pageTitle(flashingPage),
|
flashingDoc.pageTitle(flashingPage),
|
||||||
flashingDoc.pageBody(flashingPage) ){
|
flashingDoc.pageBody(flashingPage) ){
|
||||||
|
|||||||
+18
-18
@@ -113,11 +113,23 @@ public class WndJournal extends WndTabbed {
|
|||||||
catalogTab.updateList();
|
catalogTab.updateList();
|
||||||
|
|
||||||
Tab[] tabs = {
|
Tab[] tabs = {
|
||||||
|
new IconTab( Icons.JOURNAL.get() ) {
|
||||||
|
protected void select( boolean value ) {
|
||||||
|
super.select( value );
|
||||||
|
notesTab.active = notesTab.visible = value;
|
||||||
|
if (value) last_index = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected String hoverText() {
|
||||||
|
return Messages.get(notesTab, "title");
|
||||||
|
}
|
||||||
|
},
|
||||||
new IconTab( new ItemSprite(ItemSpriteSheet.MASTERY, null) ) {
|
new IconTab( new ItemSprite(ItemSpriteSheet.MASTERY, null) ) {
|
||||||
protected void select( boolean value ) {
|
protected void select( boolean value ) {
|
||||||
super.select( value );
|
super.select( value );
|
||||||
guideTab.active = guideTab.visible = value;
|
guideTab.active = guideTab.visible = value;
|
||||||
if (value) last_index = 0;
|
if (value) last_index = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -125,28 +137,16 @@ public class WndJournal extends WndTabbed {
|
|||||||
return Messages.get(guideTab, "title");
|
return Messages.get(guideTab, "title");
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
new IconTab( new ItemSprite(ItemSpriteSheet.ALCH_PAGE, null) ) {
|
new IconTab( Icons.ALCHEMY.get() ) {
|
||||||
protected void select( boolean value ) {
|
protected void select( boolean value ) {
|
||||||
super.select( value );
|
super.select( value );
|
||||||
alchemyTab.active = alchemyTab.visible = value;
|
alchemyTab.active = alchemyTab.visible = value;
|
||||||
if (value) last_index = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected String hoverText() {
|
|
||||||
return Messages.get(alchemyTab, "title");
|
|
||||||
}
|
|
||||||
},
|
|
||||||
new IconTab( Icons.get(Icons.STAIRS) ) {
|
|
||||||
protected void select( boolean value ) {
|
|
||||||
super.select( value );
|
|
||||||
notesTab.active = notesTab.visible = value;
|
|
||||||
if (value) last_index = 2;
|
if (value) last_index = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected String hoverText() {
|
protected String hoverText() {
|
||||||
return Messages.get(notesTab, "title");
|
return Messages.get(alchemyTab, "title");
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
new IconTab( Icons.CATALOG.get() ) {
|
new IconTab( Icons.CATALOG.get() ) {
|
||||||
@@ -478,12 +478,12 @@ public class WndJournal extends WndTabbed {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private static class CatalogTab extends Component{
|
public static class CatalogTab extends Component{
|
||||||
|
|
||||||
private RedButton[] itemButtons;
|
private RedButton[] itemButtons;
|
||||||
private static final int NUM_BUTTONS = 4;
|
private static final int NUM_BUTTONS = 4;
|
||||||
|
|
||||||
private static int currentItemIdx = 0;
|
public static int currentItemIdx = 0;
|
||||||
private static float[] scrollPositions = new float[NUM_BUTTONS];
|
private static float[] scrollPositions = new float[NUM_BUTTONS];
|
||||||
|
|
||||||
//sprite locations
|
//sprite locations
|
||||||
|
|||||||
Reference in New Issue
Block a user