diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/Dungeon.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/Dungeon.java index a3bc7f870..538b82476 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/Dungeon.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/Dungeon.java @@ -160,7 +160,7 @@ public class Dungeon { Random.seed(); Statistics.reset(); - Journal.reset(); + Notes.reset(); quickslot.reset(); QuickSlotButton.reset(); @@ -482,7 +482,7 @@ public class Dungeon { SpecialRoom.storeRoomsInBundle( bundle ); Statistics.storeInBundle( bundle ); - Journal.storeInBundle( bundle ); + Notes.storeInBundle( bundle ); Generator.storeInBundle( bundle ); Scroll.save( bundle ); @@ -608,7 +608,7 @@ public class Dungeon { depth = bundle.getInt( DEPTH ); Statistics.restoreFromBundle( bundle ); - Journal.restoreFromBundle( bundle ); + Notes.restoreFromBundle( bundle ); Generator.restoreFromBundle( bundle ); droppedItems = new SparseArray>(); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/Notes.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/Notes.java new file mode 100644 index 000000000..dda1dfabf --- /dev/null +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/Notes.java @@ -0,0 +1,125 @@ +/* + * Pixel Dungeon + * Copyright (C) 2012-2015 Oleg Dolya + * + * Shattered Pixel Dungeon + * Copyright (C) 2014-2017 Evan Debenham + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see + */ + +package com.shatteredpixel.shatteredpixeldungeon; + +import com.shatteredpixel.shatteredpixeldungeon.messages.Messages; +import com.watabou.utils.Bundlable; +import com.watabou.utils.Bundle; + +import java.util.ArrayList; + +public class Notes { + + public enum Feature { + WELL_OF_HEALTH, + WELL_OF_AWARENESS, + WELL_OF_TRANSMUTATION, + ALCHEMY, + GARDEN, + STATUE, + + GHOST, + WANDMAKER, + TROLL, + IMP; + + public String desc() { + return Messages.get(this, name()); + } + }; + + public static class Record implements Comparable, Bundlable { + + private static final String FEATURE = "feature"; + private static final String DEPTH = "depth"; + + public Feature feature; + public int depth; + + public Record() { + } + + public Record( Feature feature, int depth ) { + this.feature = feature; + this.depth = depth; + } + + @Override + public int compareTo( Record another ) { + return another.depth - depth; + } + + @Override + public void restoreFromBundle( Bundle bundle ) { + feature = Feature.valueOf( bundle.getString( FEATURE ) ); + depth = bundle.getInt( DEPTH ); + } + + @Override + public void storeInBundle( Bundle bundle ) { + bundle.put( FEATURE, feature.toString() ); + bundle.put( DEPTH, depth ); + } + } + + public static ArrayList records; + + public static void reset() { + records = new ArrayList(); + } + + private static final String JOURNAL = "journal"; + + public static void storeInBundle( Bundle bundle ) { + bundle.put( JOURNAL, records ); + } + + public static void restoreFromBundle( Bundle bundle ) { + records = new ArrayList(); + for (Bundlable rec : bundle.getCollection( JOURNAL ) ) { + records.add( (Record) rec ); + } + } + + public static void add( Feature feature ) { + int size = records.size(); + for (int i=0; i < size; i++) { + Record rec = records.get( i ); + if (rec.feature == feature && rec.depth == Dungeon.depth) { + return; + } + } + + records.add( new Record( feature, Dungeon.depth ) ); + } + + public static void remove( Feature feature ) { + int size = records.size(); + for (int i=0; i < size; i++) { + Record rec = records.get( i ); + if (rec.feature == feature && rec.depth == Dungeon.depth) { + records.remove( i ); + return; + } + } + } +} diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/blobs/Alchemy.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/blobs/Alchemy.java index cbed89fdd..aa4bae7ab 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/blobs/Alchemy.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/blobs/Alchemy.java @@ -22,7 +22,7 @@ package com.shatteredpixel.shatteredpixeldungeon.actors.blobs; import com.shatteredpixel.shatteredpixeldungeon.Dungeon; -import com.shatteredpixel.shatteredpixeldungeon.Journal; +import com.shatteredpixel.shatteredpixeldungeon.Notes; import com.shatteredpixel.shatteredpixeldungeon.effects.BlobEmitter; import com.shatteredpixel.shatteredpixeldungeon.effects.Speck; import com.shatteredpixel.shatteredpixeldungeon.items.Heap; @@ -53,7 +53,7 @@ public class Alchemy extends Blob { area.union(pos%Dungeon.level.width(), pos/Dungeon.level.width()); if (Dungeon.visible[pos]) { - Journal.add( Journal.Feature.ALCHEMY ); + Notes.add( Notes.Feature.ALCHEMY ); } } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/blobs/Foliage.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/blobs/Foliage.java index 9a6b93cab..b7d5cc22c 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/blobs/Foliage.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/blobs/Foliage.java @@ -22,7 +22,7 @@ package com.shatteredpixel.shatteredpixeldungeon.actors.blobs; import com.shatteredpixel.shatteredpixeldungeon.Dungeon; -import com.shatteredpixel.shatteredpixeldungeon.Journal; +import com.shatteredpixel.shatteredpixeldungeon.Notes; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Shadows; import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero; @@ -69,7 +69,7 @@ public class Foliage extends Blob { } if (visible) { - Journal.add( Journal.Feature.GARDEN ); + Notes.add( Notes.Feature.GARDEN ); } } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/blobs/WaterOfAwareness.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/blobs/WaterOfAwareness.java index 9f3f74d9b..1e17c233c 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/blobs/WaterOfAwareness.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/blobs/WaterOfAwareness.java @@ -24,9 +24,8 @@ package com.shatteredpixel.shatteredpixeldungeon.actors.blobs; import com.shatteredpixel.shatteredpixeldungeon.Assets; import com.shatteredpixel.shatteredpixeldungeon.Badges; import com.shatteredpixel.shatteredpixeldungeon.Dungeon; -import com.shatteredpixel.shatteredpixeldungeon.tiles.DungeonTilemap; -import com.shatteredpixel.shatteredpixeldungeon.Journal; -import com.shatteredpixel.shatteredpixeldungeon.Journal.Feature; +import com.shatteredpixel.shatteredpixeldungeon.Notes; +import com.shatteredpixel.shatteredpixeldungeon.Notes.Feature; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Awareness; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff; import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero; @@ -37,6 +36,7 @@ import com.shatteredpixel.shatteredpixeldungeon.items.Item; import com.shatteredpixel.shatteredpixeldungeon.levels.Terrain; import com.shatteredpixel.shatteredpixeldungeon.messages.Messages; import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene; +import com.shatteredpixel.shatteredpixeldungeon.tiles.DungeonTilemap; import com.shatteredpixel.shatteredpixeldungeon.utils.GLog; import com.watabou.noosa.audio.Sample; @@ -70,7 +70,7 @@ public class WaterOfAwareness extends WellWater { GLog.p( Messages.get(this, "procced") ); - Journal.remove( Feature.WELL_OF_AWARENESS ); + Notes.remove( Feature.WELL_OF_AWARENESS ); return true; } @@ -85,7 +85,7 @@ public class WaterOfAwareness extends WellWater { emitter.parent.add( new Identification( DungeonTilemap.tileCenterToWorld( pos ) ) ); - Journal.remove( Feature.WELL_OF_AWARENESS ); + Notes.remove( Feature.WELL_OF_AWARENESS ); return item; } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/blobs/WaterOfHealth.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/blobs/WaterOfHealth.java index bb00be6a1..10525ecaa 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/blobs/WaterOfHealth.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/blobs/WaterOfHealth.java @@ -23,8 +23,8 @@ package com.shatteredpixel.shatteredpixeldungeon.actors.blobs; import com.shatteredpixel.shatteredpixeldungeon.Assets; import com.shatteredpixel.shatteredpixeldungeon.Dungeon; -import com.shatteredpixel.shatteredpixeldungeon.Journal; -import com.shatteredpixel.shatteredpixeldungeon.Journal.Feature; +import com.shatteredpixel.shatteredpixeldungeon.Notes; +import com.shatteredpixel.shatteredpixeldungeon.Notes.Feature; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Hunger; import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero; import com.shatteredpixel.shatteredpixeldungeon.effects.BlobEmitter; @@ -55,7 +55,7 @@ public class WaterOfHealth extends WellWater { GLog.p( Messages.get(this, "procced") ); - Journal.remove( Feature.WELL_OF_HEALTH ); + Notes.remove( Feature.WELL_OF_HEALTH ); return true; } @@ -64,7 +64,7 @@ public class WaterOfHealth extends WellWater { protected Item affectItem( Item item ) { if (item instanceof DewVial && !((DewVial)item).isFull()) { ((DewVial)item).fill(); - Journal.remove( Feature.WELL_OF_HEALTH ); + Notes.remove( Feature.WELL_OF_HEALTH ); return item; } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/blobs/WaterOfTransmutation.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/blobs/WaterOfTransmutation.java index 16699d3ae..77af5df43 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/blobs/WaterOfTransmutation.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/blobs/WaterOfTransmutation.java @@ -21,8 +21,8 @@ package com.shatteredpixel.shatteredpixeldungeon.actors.blobs; -import com.shatteredpixel.shatteredpixeldungeon.Journal; -import com.shatteredpixel.shatteredpixeldungeon.Journal.Feature; +import com.shatteredpixel.shatteredpixeldungeon.Notes; +import com.shatteredpixel.shatteredpixeldungeon.Notes.Feature; import com.shatteredpixel.shatteredpixeldungeon.ShatteredPixelDungeon; import com.shatteredpixel.shatteredpixeldungeon.effects.BlobEmitter; import com.shatteredpixel.shatteredpixeldungeon.effects.Speck; @@ -71,7 +71,7 @@ public class WaterOfTransmutation extends WellWater { } if (item != null) { - Journal.remove( Feature.WELL_OF_TRANSMUTATION ); + Notes.remove( Feature.WELL_OF_TRANSMUTATION ); } return item; diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/blobs/WellWater.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/blobs/WellWater.java index f5a0fd4ab..38f0bc9ce 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/blobs/WellWater.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/blobs/WellWater.java @@ -22,8 +22,8 @@ package com.shatteredpixel.shatteredpixeldungeon.actors.blobs; import com.shatteredpixel.shatteredpixeldungeon.Dungeon; -import com.shatteredpixel.shatteredpixeldungeon.Journal; -import com.shatteredpixel.shatteredpixeldungeon.Journal.Feature; +import com.shatteredpixel.shatteredpixeldungeon.Notes; +import com.shatteredpixel.shatteredpixeldungeon.Notes.Feature; import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero; import com.shatteredpixel.shatteredpixeldungeon.items.Heap; import com.shatteredpixel.shatteredpixeldungeon.items.Item; @@ -58,11 +58,11 @@ public class WellWater extends Blob { if (Dungeon.visible[pos]) { if (this instanceof WaterOfAwareness) { - Journal.add( Feature.WELL_OF_AWARENESS ); + Notes.add( Feature.WELL_OF_AWARENESS ); } else if (this instanceof WaterOfHealth) { - Journal.add( Feature.WELL_OF_HEALTH ); + Notes.add( Feature.WELL_OF_HEALTH ); } else if (this instanceof WaterOfTransmutation) { - Journal.add( Feature.WELL_OF_TRANSMUTATION ); + Notes.add( Feature.WELL_OF_TRANSMUTATION ); } } } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Statue.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Statue.java index 8d1541795..4cf11ecb1 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Statue.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Statue.java @@ -22,7 +22,7 @@ package com.shatteredpixel.shatteredpixeldungeon.actors.mobs; import com.shatteredpixel.shatteredpixeldungeon.Dungeon; -import com.shatteredpixel.shatteredpixeldungeon.Journal; +import com.shatteredpixel.shatteredpixeldungeon.Notes; import com.shatteredpixel.shatteredpixeldungeon.actors.Char; import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.ToxicGas; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Poison; @@ -80,7 +80,7 @@ public class Statue extends Mob { @Override protected boolean act() { if (Dungeon.visible[pos]) { - Journal.add( Journal.Feature.STATUE ); + Notes.add( Notes.Feature.STATUE ); } return super.act(); } @@ -139,7 +139,7 @@ public class Statue extends Mob { @Override public void destroy() { - Journal.remove( Journal.Feature.STATUE ); + Notes.remove( Notes.Feature.STATUE ); super.destroy(); } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/npcs/Blacksmith.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/npcs/Blacksmith.java index 809840217..75a4709eb 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/npcs/Blacksmith.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/npcs/Blacksmith.java @@ -24,7 +24,7 @@ package com.shatteredpixel.shatteredpixeldungeon.actors.mobs.npcs; import com.shatteredpixel.shatteredpixeldungeon.Assets; import com.shatteredpixel.shatteredpixeldungeon.Badges; import com.shatteredpixel.shatteredpixeldungeon.Dungeon; -import com.shatteredpixel.shatteredpixeldungeon.Journal; +import com.shatteredpixel.shatteredpixeldungeon.Notes; import com.shatteredpixel.shatteredpixeldungeon.actors.Char; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff; import com.shatteredpixel.shatteredpixeldungeon.items.EquipableItem; @@ -86,7 +86,7 @@ public class Blacksmith extends NPC { } } ); - Journal.add( Journal.Feature.TROLL ); + Notes.add( Notes.Feature.TROLL ); } else if (!Quest.completed) { if (Quest.alternative) { @@ -203,7 +203,7 @@ public class Blacksmith extends NPC { Quest.reforged = true; - Journal.remove( Journal.Feature.TROLL ); + Notes.remove( Notes.Feature.TROLL ); } @Override diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/npcs/Ghost.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/npcs/Ghost.java index 1759d2962..73c191429 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/npcs/Ghost.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/npcs/Ghost.java @@ -23,7 +23,7 @@ package com.shatteredpixel.shatteredpixeldungeon.actors.mobs.npcs; import com.shatteredpixel.shatteredpixeldungeon.Assets; import com.shatteredpixel.shatteredpixeldungeon.Dungeon; -import com.shatteredpixel.shatteredpixeldungeon.Journal; +import com.shatteredpixel.shatteredpixeldungeon.Notes; import com.shatteredpixel.shatteredpixeldungeon.ShatteredPixelDungeon; import com.shatteredpixel.shatteredpixeldungeon.actors.Char; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff; @@ -170,7 +170,7 @@ public class Ghost extends NPC { GameScene.add(questBoss); GameScene.show( new WndQuest( this, txt_quest ) ); Quest.given = true; - Journal.add( Journal.Feature.GHOST ); + Notes.add( Notes.Feature.GHOST ); } } @@ -342,7 +342,7 @@ public class Ghost extends NPC { weapon = null; armor = null; - Journal.remove( Journal.Feature.GHOST ); + Notes.remove( Notes.Feature.GHOST ); } public static boolean completed(){ diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/npcs/Imp.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/npcs/Imp.java index 303184520..0297085ea 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/npcs/Imp.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/npcs/Imp.java @@ -22,7 +22,7 @@ package com.shatteredpixel.shatteredpixeldungeon.actors.mobs.npcs; import com.shatteredpixel.shatteredpixeldungeon.Dungeon; -import com.shatteredpixel.shatteredpixeldungeon.Journal; +import com.shatteredpixel.shatteredpixeldungeon.Notes; import com.shatteredpixel.shatteredpixeldungeon.actors.Char; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff; import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Golem; @@ -105,7 +105,7 @@ public class Imp extends NPC { Quest.given = true; Quest.completed = false; - Journal.add( Journal.Feature.IMP ); + Notes.add( Notes.Feature.IMP ); } return false; @@ -214,7 +214,7 @@ public class Imp extends NPC { reward = null; completed = true; - Journal.remove( Journal.Feature.IMP ); + Notes.remove( Notes.Feature.IMP ); } public static boolean isCompleted() { diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/npcs/Wandmaker.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/npcs/Wandmaker.java index d9ec15492..63a30015a 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/npcs/Wandmaker.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/npcs/Wandmaker.java @@ -23,7 +23,7 @@ package com.shatteredpixel.shatteredpixeldungeon.actors.mobs.npcs; import com.shatteredpixel.shatteredpixeldungeon.Challenges; import com.shatteredpixel.shatteredpixeldungeon.Dungeon; -import com.shatteredpixel.shatteredpixeldungeon.Journal; +import com.shatteredpixel.shatteredpixeldungeon.Notes; import com.shatteredpixel.shatteredpixeldungeon.actors.Char; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff; import com.shatteredpixel.shatteredpixeldungeon.items.Generator; @@ -163,7 +163,7 @@ public class Wandmaker extends NPC { } }); - Journal.add( Journal.Feature.WANDMAKER ); + Notes.add( Notes.Feature.WANDMAKER ); Quest.given = true; } @@ -307,7 +307,7 @@ public class Wandmaker extends NPC { wand1 = null; wand2 = null; - Journal.remove( Journal.Feature.WANDMAKER ); + Notes.remove( Notes.Feature.WANDMAKER ); } } } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndJournal.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndJournal.java index ddaf5b812..64f4da4a6 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndJournal.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndJournal.java @@ -22,7 +22,7 @@ package com.shatteredpixel.shatteredpixeldungeon.windows; import com.shatteredpixel.shatteredpixeldungeon.Dungeon; -import com.shatteredpixel.shatteredpixeldungeon.Journal; +import com.shatteredpixel.shatteredpixeldungeon.Notes; import com.shatteredpixel.shatteredpixeldungeon.ShatteredPixelDungeon; import com.shatteredpixel.shatteredpixeldungeon.items.Item; import com.shatteredpixel.shatteredpixeldungeon.items.keys.GoldenKey; @@ -62,7 +62,7 @@ public class WndJournal extends WndTabbed { private static final int ITEM_HEIGHT = 18; - private Notes notes; + private NotesTab notesTab; private CatalogTab catalogTab; public static int last_index = 0; @@ -74,10 +74,10 @@ public class WndJournal extends WndTabbed { resize(width, height); - notes = new Notes(); - add(notes); - notes.setRect(0, 0, width, height); - notes.updateList(); + notesTab = new NotesTab(); + add(notesTab); + notesTab.setRect(0, 0, width, height); + notesTab.updateList(); catalogTab = new CatalogTab(); add(catalogTab); @@ -94,7 +94,7 @@ public class WndJournal extends WndTabbed { new LabeledTab( "Notes" ) { protected void select( boolean value ) { super.select( value ); - notes.active = notes.visible = value; + notesTab.active = notesTab.visible = value; if (value) last_index = 1; }; }, @@ -181,11 +181,11 @@ public class WndJournal extends WndTabbed { } } - private static class Notes extends Component { + private static class NotesTab extends Component { private ScrollPane list; - public Notes(){ + public NotesTab(){ list = new ScrollPane( new Component() ); add( list ); } @@ -199,7 +199,7 @@ public class WndJournal extends WndTabbed { private void updateList(){ Component content = list.content(); - Collections.sort( Journal.records ); + Collections.sort( Notes.records ); float pos = 0; @@ -237,8 +237,8 @@ public class WndJournal extends WndTabbed { } - //Journal entries - for (Journal.Record rec : Journal.records) { + //Notes entries + for (Notes.Record rec : Notes.records) { ListItem item = new ListItem( Icons.get(Icons.DEPTH), rec.feature.desc(), rec.depth ); item.setRect( 0, pos, width(), ITEM_HEIGHT ); content.add( item );