diff --git a/core/src/main/assets/icons.png b/core/src/main/assets/icons.png index 49375b947..eca3d78f7 100644 Binary files a/core/src/main/assets/icons.png and b/core/src/main/assets/icons.png differ diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/AlchemyScene.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/AlchemyScene.java index 23bd961c8..dae4df7a3 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/AlchemyScene.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/AlchemyScene.java @@ -166,7 +166,7 @@ public class AlchemyScene extends PixelScene { protected void createChildren() { super.createChildren(); - arrow = Icons.get(Icons.RESUME); + arrow = Icons.get(Icons.ARROW); add(arrow); } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/RankingsScene.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/RankingsScene.java index 7ad2cfbbf..dd24a160e 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/RankingsScene.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/RankingsScene.java @@ -24,6 +24,7 @@ package com.shatteredpixel.shatteredpixeldungeon.scenes; import com.shatteredpixel.shatteredpixeldungeon.Assets; import com.shatteredpixel.shatteredpixeldungeon.Rankings; import com.shatteredpixel.shatteredpixeldungeon.ShatteredPixelDungeon; +import com.shatteredpixel.shatteredpixeldungeon.actors.hero.HeroClass; import com.shatteredpixel.shatteredpixeldungeon.effects.Flare; import com.shatteredpixel.shatteredpixeldungeon.messages.Messages; import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSprite; @@ -227,6 +228,10 @@ public class RankingsScene extends PixelScene { } classIcon.copy( Icons.get( rec.heroClass ) ); + if (rec.heroClass == HeroClass.ROGUE){ + //cloak of shadows needs to be brightened a bit + classIcon.brightness(2f); + } } @Override @@ -270,15 +275,17 @@ public class RankingsScene extends PixelScene { flare.point( shield.center() ); } - classIcon.x = x + width - classIcon.width; - classIcon.y = shield.y; + classIcon.x = x + width - 16 + (16 - classIcon.width())/2f; + classIcon.y = shield.y + (16 - classIcon.height())/2f; + align(classIcon); level.x = classIcon.x + (classIcon.width - level.width()) / 2f; level.y = classIcon.y + (classIcon.height - level.height()) / 2f + 1; align(level); - steps.x = x + width - steps.width - classIcon.width; - steps.y = shield.y; + steps.x = x + width - 32 + (16 - steps.width())/2f; + steps.y = shield.y + (16 - steps.height())/2f; + align(steps); depth.x = steps.x + (steps.width - depth.width()) / 2f; depth.y = steps.y + (steps.height - depth.height()) / 2f + 1; diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/StartScene.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/StartScene.java index 77ff722eb..6f3ba848e 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/StartScene.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/StartScene.java @@ -225,15 +225,17 @@ public class StartScene extends PixelScene { name.y = y + (height - name.baseLine())/2f; align(name); - classIcon.x = x + width - classIcon.width() - 8; + classIcon.x = x + width - 24 + (16 - classIcon.width())/2f; classIcon.y = y + (height - classIcon.height())/2f; + align(classIcon); level.x = classIcon.x + (classIcon.width() - level.width()) / 2f; level.y = classIcon.y + (classIcon.height() - level.height()) / 2f + 1; align(level); - steps.x = classIcon.x - steps.width(); + steps.x = x + width - 40 + (16 - steps.width())/2f; steps.y = y + (height - steps.height())/2f; + align(steps); depth.x = steps.x + (steps.width() - depth.width()) / 2f; depth.y = steps.y + (steps.height() - depth.height()) / 2f + 1; diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/ExitButton.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/ExitButton.java index bacfcab4a..91337f749 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/ExitButton.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/ExitButton.java @@ -23,6 +23,7 @@ package com.shatteredpixel.shatteredpixeldungeon.ui; import com.shatteredpixel.shatteredpixeldungeon.Assets; import com.shatteredpixel.shatteredpixeldungeon.ShatteredPixelDungeon; +import com.shatteredpixel.shatteredpixeldungeon.scenes.PixelScene; import com.shatteredpixel.shatteredpixeldungeon.scenes.TitleScene; import com.watabou.noosa.Game; import com.watabou.noosa.Image; @@ -36,8 +37,8 @@ public class ExitButton extends Button { public ExitButton() { super(); - width = image.width+4; - height = image.height+4; + width = 20; + height = 20; } @Override @@ -52,8 +53,9 @@ public class ExitButton extends Button { protected void layout() { super.layout(); - image.x = x+2; - image.y = y+2; + image.x = x + (width - image.width)/2f; + image.y = y + (height - image.height)/2f; + PixelScene.align(image); } @Override diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/Icons.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/Icons.java index 25bf6b1b8..315f5f0b9 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/Icons.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/Icons.java @@ -26,44 +26,52 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.hero.HeroClass; import com.watabou.noosa.Image; public enum Icons { - + + //button icons + CHECKED, + UNCHECKED, + INFO, + CHALLENGE_OFF, + CHALLENGE_ON, + PREFS, + LANGS, + EXIT, + CLOSE, + ARROW, + + //ingame UI icons SKULL, BUSY, COMPASS, - INFO, - PREFS, - WARNING, - TARGET, - MASTERY, - WATA, - WARRIOR, - MAGE, - ROGUE, - HUNTRESS, - CLOSE, - DEPTH, SLEEP, ALERT, LOST, + TARGET, BACKPACK, SEED_POUCH, SCROLL_HOLDER, POTION_BANDOLIER, WAND_HOLSTER, - CHECKED, - UNCHECKED, - EXIT, - NOTES, - LANGS, - CHALLENGE_OFF, - CHALLENGE_ON, - RESUME, + + //hero & rankings icons + DEPTH, + WARRIOR, + MAGE, + ROGUE, + HUNTRESS, + + //main menu icons ENTER, GOLD, RANKINGS, BADGES, CHANGES, - SHPX; + SHPX, + + //misc icons + LIBGDX, + WATA, + WARNING; public Image get() { return get( this ); @@ -72,113 +80,117 @@ public enum Icons { public static Image get( Icons type ) { Image icon = new Image( Assets.ICONS ); switch (type) { - case SKULL: - icon.frame( icon.texture.uvRect( 0, 0, 8, 8 ) ); - break; - case BUSY: - icon.frame( icon.texture.uvRect( 8, 0, 16, 8 ) ); - break; - case COMPASS: - icon.frame( icon.texture.uvRect( 0, 8, 7, 13 ) ); - break; - case INFO: - icon.frame( icon.texture.uvRect( 16, 0, 30, 14 ) ); - break; - case PREFS: - icon.frame( icon.texture.uvRect( 30, 0, 46, 16 ) ); - break; - case WARNING: - icon.frame( icon.texture.uvRect( 46, 0, 58, 12 ) ); - break; - case TARGET: - icon.frame( icon.texture.uvRect( 0, 13, 16, 29 ) ); - break; - case MASTERY: - icon.frame( icon.texture.uvRect( 16, 14, 30, 28 ) ); - break; - case WATA: - icon.frame( icon.texture.uvRect( 30, 16, 45, 26 ) ); - break; - case WARRIOR: - icon.frame( icon.texture.uvRect( 0, 29, 16, 45 ) ); - break; - case MAGE: - icon.frame( icon.texture.uvRect( 16, 29, 32, 45 ) ); - break; - case ROGUE: - icon.frame( icon.texture.uvRect( 32, 29, 48, 45 ) ); - break; - case HUNTRESS: - icon.frame( icon.texture.uvRect( 48, 29, 64, 45 ) ); - break; - case CLOSE: - icon.frame( icon.texture.uvRect( 0, 45, 13, 58 ) ); - break; - case DEPTH: - icon.frame( icon.texture.uvRect( 38, 46, 54, 62 ) ); - break; - case SLEEP: - icon.frame( icon.texture.uvRect( 13, 45, 22, 53 ) ); - break; - case ALERT: - icon.frame( icon.texture.uvRect( 22, 45, 30, 53 ) ); - break; - case LOST: - icon.frame( icon.texture.uvRect( 30, 45, 38, 53 ) ); - break; - case BACKPACK: - icon.frame( icon.texture.uvRect( 58, 0, 68, 10 ) ); - break; - case SCROLL_HOLDER: - icon.frame( icon.texture.uvRect( 68, 0, 78, 10 ) ); - break; - case SEED_POUCH: - icon.frame( icon.texture.uvRect( 78, 0, 88, 10 ) ); - break; - case WAND_HOLSTER: - icon.frame( icon.texture.uvRect( 88, 0, 98, 10 ) ); - break; - case POTION_BANDOLIER: - icon.frame( icon.texture.uvRect( 98, 0, 108, 10 ) ); - break; case CHECKED: - icon.frame( icon.texture.uvRect( 54, 12, 66, 24 ) ); + icon.frame( icon.texture.uvRect( 0, 0, 12, 12 ) ); break; case UNCHECKED: - icon.frame( icon.texture.uvRect( 66, 12, 78, 24 ) ); + icon.frame( icon.texture.uvRect( 16, 0, 28, 12 ) ); break; - case EXIT: - icon.frame( icon.texture.uvRect( 108, 0, 124, 16 ) ); - break; - case LANGS: - icon.frame( icon.texture.uvRect( 109, 16, 121, 25 ) ); - break; - case CHALLENGE_OFF: - icon.frame( icon.texture.uvRect( 78, 12, 92, 24 ) ); + case INFO: + icon.frame( icon.texture.uvRect( 32, 0, 46, 14 ) ); break; case CHALLENGE_ON: - icon.frame( icon.texture.uvRect( 92, 12, 108, 24 ) ); + icon.frame( icon.texture.uvRect( 48, 0, 62, 12 ) ); break; - case RESUME: - icon.frame( icon.texture.uvRect( 13, 53, 24, 64 ) ); + case CHALLENGE_OFF: + icon.frame( icon.texture.uvRect( 64, 0, 78, 12 ) ); break; + case PREFS: + icon.frame( icon.texture.uvRect( 80, 0, 92, 12 ) ); + break; + case LANGS: + icon.frame( icon.texture.uvRect( 96, 0, 108, 9 ) ); + break; + case EXIT: + icon.frame( icon.texture.uvRect( 112, 0, 125, 9 ) ); + break; + case CLOSE: + icon.frame( icon.texture.uvRect( 0, 16, 11, 27 ) ); + break; + case ARROW: + icon.frame( icon.texture.uvRect( 16, 16, 27, 27 ) ); + break; + + case SKULL: + icon.frame( icon.texture.uvRect( 0, 32, 8, 40 ) ); + break; + case BUSY: + icon.frame( icon.texture.uvRect( 8, 32, 16, 40 ) ); + break; + case COMPASS: + icon.frame( icon.texture.uvRect( 0, 40, 7, 45 ) ); + break; + case SLEEP: + icon.frame( icon.texture.uvRect( 16, 32, 25, 40 ) ); + break; + case ALERT: + icon.frame( icon.texture.uvRect( 16, 40, 24, 48 ) ); + break; + case LOST: + icon.frame( icon.texture.uvRect( 24, 40, 32, 48 ) ); + break; + case TARGET: + icon.frame( icon.texture.uvRect( 32, 32, 48, 48 ) ); + break; + case BACKPACK: + icon.frame( icon.texture.uvRect( 48, 32, 58, 42 ) ); + break; + case SCROLL_HOLDER: + icon.frame( icon.texture.uvRect( 58, 32, 68, 42 ) ); + break; + case SEED_POUCH: + icon.frame( icon.texture.uvRect( 68, 32, 78, 42 ) ); + break; + case WAND_HOLSTER: + icon.frame( icon.texture.uvRect( 78, 32, 88, 42 ) ); + break; + case POTION_BANDOLIER: + icon.frame( icon.texture.uvRect( 88, 32, 98, 42 ) ); + break; + + case DEPTH: + icon.frame( icon.texture.uvRect( 0, 48, 13, 64 ) ); + break; + case WARRIOR: + icon.frame( icon.texture.uvRect( 16, 48, 25, 63 ) ); + break; + case MAGE: + icon.frame( icon.texture.uvRect( 32, 48, 47, 62 ) ); + break; + case ROGUE: + icon.frame( icon.texture.uvRect( 48, 48, 57, 63 ) ); + break; + case HUNTRESS: + icon.frame( icon.texture.uvRect( 64, 48, 80, 64 ) ); + break; + case ENTER: - icon.frame( icon.texture.uvRect( 66, 26, 83, 43 ) ); - break; - case GOLD: - icon.frame( icon.texture.uvRect( 83, 26, 100, 42 ) ); + icon.frame( icon.texture.uvRect( 0, 64, 17, 81 ) ); break; case RANKINGS: - icon.frame( icon.texture.uvRect( 100, 26, 117, 43 ) ); + icon.frame( icon.texture.uvRect( 17, 64, 34, 81 ) ); break; case BADGES: - icon.frame( icon.texture.uvRect( 66, 46, 83, 63 ) ); + icon.frame( icon.texture.uvRect( 34, 64, 51, 81 ) ); break; case CHANGES: - icon.frame( icon.texture.uvRect( 83, 47, 100, 62 ) ); + icon.frame( icon.texture.uvRect( 51, 64, 68, 79 ) ); break; case SHPX: - icon.frame( icon.texture.uvRect( 100, 46, 116, 62 ) ); + icon.frame( icon.texture.uvRect( 68, 64, 84, 80 ) ); + break; + case GOLD: + icon.frame( icon.texture.uvRect( 85, 64, 102, 80 ) ); + break; + + case LIBGDX: + icon.frame( icon.texture.uvRect( 0, 81, 16, 94 ) ); + break; + case WATA: + icon.frame( icon.texture.uvRect( 17, 81, 34, 93 ) ); + break; + case WARNING: + icon.frame( icon.texture.uvRect( 34, 81, 48, 95 ) ); break; } return icon; diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/QuickRecipe.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/QuickRecipe.java index 23f673594..a7e1b35bf 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/QuickRecipe.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/QuickRecipe.java @@ -122,10 +122,10 @@ public class QuickRecipe extends Component { } if (cost > 0) { - arrow = new arrow(Icons.get(Icons.RESUME), cost); + arrow = new arrow(Icons.get(Icons.ARROW), cost); arrow.hardlightText(0x00CCFF); } else { - arrow = new arrow(Icons.get(Icons.RESUME)); + arrow = new arrow(Icons.get(Icons.ARROW)); } if (hasInputs) { arrow.icon.tint(1, 1, 0, 1); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/ResumeIndicator.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/ResumeIndicator.java index f70aed2f1..5a68a055e 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/ResumeIndicator.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/ResumeIndicator.java @@ -42,7 +42,7 @@ public class ResumeIndicator extends Tag { protected void createChildren() { super.createChildren(); - icon = Icons.get( Icons.RESUME ); + icon = Icons.get( Icons.ARROW); add( icon ); }