v2.5.0: added new icons for some existing landmarks
This commit is contained in:
Binary file not shown.
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 16 KiB |
@@ -21,24 +21,21 @@
|
||||
|
||||
package com.shatteredpixel.shatteredpixeldungeon.journal;
|
||||
|
||||
import com.shatteredpixel.shatteredpixeldungeon.Assets;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.keys.Key;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.plants.Sungrass;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.scenes.PixelScene;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.BlacksmithSprite;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.GhostSprite;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.ImpSprite;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSprite;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.ShopkeeperSprite;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.SpawnerSprite;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.StatueSprite;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.WandmakerSprite;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.tiles.TerrainFeaturesTilemap;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.BuffIcon;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.BuffIndicator;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.Icons;
|
||||
import com.watabou.noosa.BitmapText;
|
||||
import com.watabou.noosa.Image;
|
||||
import com.watabou.noosa.Visual;
|
||||
import com.watabou.utils.Bundlable;
|
||||
import com.watabou.utils.Bundle;
|
||||
|
||||
@@ -58,6 +55,8 @@ public class Notes {
|
||||
|
||||
public Image icon() { return Icons.STAIRS.get(); }
|
||||
|
||||
public Visual secondIcon() { return null; }
|
||||
|
||||
public int quantity() { return 1; }
|
||||
|
||||
public abstract String title();
|
||||
@@ -86,6 +85,10 @@ public class Notes {
|
||||
}
|
||||
|
||||
public enum Landmark {
|
||||
//a landmark for each depth type
|
||||
|
||||
//more special room landmarks?
|
||||
// distant well
|
||||
WELL_OF_HEALTH,
|
||||
WELL_OF_AWARENESS,
|
||||
ALCHEMY,
|
||||
@@ -98,6 +101,7 @@ public class Notes {
|
||||
WANDMAKER,
|
||||
TROLL,
|
||||
IMP,
|
||||
//rat king?
|
||||
|
||||
DEMON_SPAWNER;
|
||||
|
||||
@@ -122,20 +126,20 @@ public class Notes {
|
||||
default:
|
||||
return super.icon();
|
||||
|
||||
//TODO we probably want a separate image file for landmark visuals, especially if we expand this
|
||||
case WELL_OF_HEALTH:
|
||||
return Icons.get(Icons.WELL_HEALTH);
|
||||
case WELL_OF_AWARENESS:
|
||||
return new Image(Assets.Environment.TILES_SEWERS, 48, 16, 16, 16);
|
||||
return Icons.get(Icons.WELL_AWARENESS);
|
||||
case ALCHEMY:
|
||||
return new Image(Assets.Environment.TILES_SEWERS, 0, 64, 16, 16);
|
||||
return Icons.get(Icons.ALCHEMY);
|
||||
case GARDEN:
|
||||
return TerrainFeaturesTilemap.getPlantVisual(new Sungrass());
|
||||
return Icons.get(Icons.GRASS);
|
||||
case STATUE:
|
||||
return new Image(new StatueSprite());
|
||||
case SACRIFICIAL_FIRE:
|
||||
return new BuffIcon(BuffIndicator.SACRIFICE, true);
|
||||
return Icons.get(Icons.SACRIFICE_ALTAR);
|
||||
case SHOP:
|
||||
return new Image(new ShopkeeperSprite());
|
||||
return Icons.get(Icons.GOLD);
|
||||
|
||||
case GHOST:
|
||||
return new Image(new GhostSprite());
|
||||
@@ -203,6 +207,17 @@ public class Notes {
|
||||
return new ItemSprite(key);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Visual secondIcon() {
|
||||
if (quantity() > 1){
|
||||
BitmapText text = new BitmapText(Integer.toString(quantity()), PixelScene.pixelFont);
|
||||
text.measure();
|
||||
return text;
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String title() {
|
||||
return key.title();
|
||||
|
||||
@@ -85,6 +85,10 @@ public enum Icons {
|
||||
BUFFS,
|
||||
CATALOG,
|
||||
ALCHEMY,
|
||||
GRASS,
|
||||
WELL_HEALTH,
|
||||
WELL_AWARENESS,
|
||||
SACRIFICE_ALTAR,
|
||||
|
||||
//smaller icons, variable spacing
|
||||
SKULL,
|
||||
@@ -272,6 +276,18 @@ public enum Icons {
|
||||
case ALCHEMY:
|
||||
icon.frame( icon.texture.uvRectBySize( 112, 48, 16, 16 ) );
|
||||
break;
|
||||
case GRASS:
|
||||
icon.frame( icon.texture.uvRectBySize( 128, 48, 16, 16 ) );
|
||||
break;
|
||||
case WELL_HEALTH:
|
||||
icon.frame( icon.texture.uvRectBySize( 144, 48, 16, 16 ) );
|
||||
break;
|
||||
case WELL_AWARENESS:
|
||||
icon.frame( icon.texture.uvRectBySize( 160, 48, 16, 16 ) );
|
||||
break;
|
||||
case SACRIFICE_ALTAR:
|
||||
icon.frame( icon.texture.uvRectBySize( 176, 48, 16, 16 ) );
|
||||
break;
|
||||
|
||||
case SKULL:
|
||||
icon.frame( icon.texture.uvRectBySize( 0, 64, 8, 8 ) );
|
||||
|
||||
@@ -23,6 +23,7 @@ package com.shatteredpixel.shatteredpixeldungeon.ui;
|
||||
|
||||
import com.shatteredpixel.shatteredpixeldungeon.scenes.PixelScene;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSprite;
|
||||
import com.watabou.noosa.BitmapText;
|
||||
import com.watabou.noosa.ColorBlock;
|
||||
import com.watabou.noosa.Image;
|
||||
import com.watabou.noosa.Visual;
|
||||
@@ -200,6 +201,7 @@ public class ScrollingGridPane extends ScrollPane {
|
||||
if (secondIcon != null){
|
||||
secondIcon.x = x + width()-secondIcon.width()-1;
|
||||
secondIcon.y = y + height()-secondIcon.height()-1;
|
||||
if (secondIcon instanceof BitmapText) secondIcon.y++;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -21,7 +21,6 @@
|
||||
|
||||
package com.shatteredpixel.shatteredpixeldungeon.windows;
|
||||
|
||||
import com.shatteredpixel.shatteredpixeldungeon.Assets;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.Badges;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.HeroClass;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.HeroSubClass;
|
||||
@@ -189,7 +188,7 @@ public class WndHeroInfo extends WndTabbed {
|
||||
break;
|
||||
case HUNTRESS:
|
||||
icons = new Image[]{ new ItemSprite(ItemSpriteSheet.SPIRIT_BOW),
|
||||
new Image(Assets.Environment.TILES_SEWERS, 32, 64, 16, 16),
|
||||
Icons.GRASS.get(),
|
||||
new ItemSprite(ItemSpriteSheet.GLOVES),
|
||||
new ItemSprite(ItemSpriteSheet.SCROLL_ISAZ)};
|
||||
break;
|
||||
|
||||
@@ -63,6 +63,7 @@ import com.shatteredpixel.shatteredpixeldungeon.ui.ScrollingListPane;
|
||||
import com.watabou.noosa.BitmapText;
|
||||
import com.watabou.noosa.ColorBlock;
|
||||
import com.watabou.noosa.Image;
|
||||
import com.watabou.noosa.Visual;
|
||||
import com.watabou.noosa.ui.Component;
|
||||
import com.watabou.utils.RectF;
|
||||
import com.watabou.utils.Reflection;
|
||||
@@ -463,10 +464,9 @@ public class WndJournal extends WndTabbed {
|
||||
}
|
||||
};
|
||||
|
||||
if (rec.quantity() > 1){
|
||||
BitmapText text = new BitmapText(Integer.toString(rec.quantity()), PixelScene.pixelFont);
|
||||
text.measure();
|
||||
gridItem.addSecondIcon( text );
|
||||
Visual secondIcon = rec.secondIcon();
|
||||
if (secondIcon != null){
|
||||
gridItem.addSecondIcon( secondIcon );
|
||||
}
|
||||
|
||||
grid.addItem(gridItem);
|
||||
|
||||
Reference in New Issue
Block a user