v0.7.4b: restructured icon files, added LibGDX and updated hero icons
This commit is contained in:
parent
441c171036
commit
ec0657fcd6
Binary file not shown.
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 2.8 KiB |
|
@ -166,7 +166,7 @@ public class AlchemyScene extends PixelScene {
|
||||||
protected void createChildren() {
|
protected void createChildren() {
|
||||||
super.createChildren();
|
super.createChildren();
|
||||||
|
|
||||||
arrow = Icons.get(Icons.RESUME);
|
arrow = Icons.get(Icons.ARROW);
|
||||||
add(arrow);
|
add(arrow);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -24,6 +24,7 @@ package com.shatteredpixel.shatteredpixeldungeon.scenes;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.Assets;
|
import com.shatteredpixel.shatteredpixeldungeon.Assets;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.Rankings;
|
import com.shatteredpixel.shatteredpixeldungeon.Rankings;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.ShatteredPixelDungeon;
|
import com.shatteredpixel.shatteredpixeldungeon.ShatteredPixelDungeon;
|
||||||
|
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.HeroClass;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.effects.Flare;
|
import com.shatteredpixel.shatteredpixeldungeon.effects.Flare;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSprite;
|
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSprite;
|
||||||
|
@ -227,6 +228,10 @@ public class RankingsScene extends PixelScene {
|
||||||
}
|
}
|
||||||
|
|
||||||
classIcon.copy( Icons.get( rec.heroClass ) );
|
classIcon.copy( Icons.get( rec.heroClass ) );
|
||||||
|
if (rec.heroClass == HeroClass.ROGUE){
|
||||||
|
//cloak of shadows needs to be brightened a bit
|
||||||
|
classIcon.brightness(2f);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -270,15 +275,17 @@ public class RankingsScene extends PixelScene {
|
||||||
flare.point( shield.center() );
|
flare.point( shield.center() );
|
||||||
}
|
}
|
||||||
|
|
||||||
classIcon.x = x + width - classIcon.width;
|
classIcon.x = x + width - 16 + (16 - classIcon.width())/2f;
|
||||||
classIcon.y = shield.y;
|
classIcon.y = shield.y + (16 - classIcon.height())/2f;
|
||||||
|
align(classIcon);
|
||||||
|
|
||||||
level.x = classIcon.x + (classIcon.width - level.width()) / 2f;
|
level.x = classIcon.x + (classIcon.width - level.width()) / 2f;
|
||||||
level.y = classIcon.y + (classIcon.height - level.height()) / 2f + 1;
|
level.y = classIcon.y + (classIcon.height - level.height()) / 2f + 1;
|
||||||
align(level);
|
align(level);
|
||||||
|
|
||||||
steps.x = x + width - steps.width - classIcon.width;
|
steps.x = x + width - 32 + (16 - steps.width())/2f;
|
||||||
steps.y = shield.y;
|
steps.y = shield.y + (16 - steps.height())/2f;
|
||||||
|
align(steps);
|
||||||
|
|
||||||
depth.x = steps.x + (steps.width - depth.width()) / 2f;
|
depth.x = steps.x + (steps.width - depth.width()) / 2f;
|
||||||
depth.y = steps.y + (steps.height - depth.height()) / 2f + 1;
|
depth.y = steps.y + (steps.height - depth.height()) / 2f + 1;
|
||||||
|
|
|
@ -225,15 +225,17 @@ public class StartScene extends PixelScene {
|
||||||
name.y = y + (height - name.baseLine())/2f;
|
name.y = y + (height - name.baseLine())/2f;
|
||||||
align(name);
|
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;
|
classIcon.y = y + (height - classIcon.height())/2f;
|
||||||
|
align(classIcon);
|
||||||
|
|
||||||
level.x = classIcon.x + (classIcon.width() - level.width()) / 2f;
|
level.x = classIcon.x + (classIcon.width() - level.width()) / 2f;
|
||||||
level.y = classIcon.y + (classIcon.height() - level.height()) / 2f + 1;
|
level.y = classIcon.y + (classIcon.height() - level.height()) / 2f + 1;
|
||||||
align(level);
|
align(level);
|
||||||
|
|
||||||
steps.x = classIcon.x - steps.width();
|
steps.x = x + width - 40 + (16 - steps.width())/2f;
|
||||||
steps.y = y + (height - steps.height())/2f;
|
steps.y = y + (height - steps.height())/2f;
|
||||||
|
align(steps);
|
||||||
|
|
||||||
depth.x = steps.x + (steps.width() - depth.width()) / 2f;
|
depth.x = steps.x + (steps.width() - depth.width()) / 2f;
|
||||||
depth.y = steps.y + (steps.height() - depth.height()) / 2f + 1;
|
depth.y = steps.y + (steps.height() - depth.height()) / 2f + 1;
|
||||||
|
|
|
@ -23,6 +23,7 @@ package com.shatteredpixel.shatteredpixeldungeon.ui;
|
||||||
|
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.Assets;
|
import com.shatteredpixel.shatteredpixeldungeon.Assets;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.ShatteredPixelDungeon;
|
import com.shatteredpixel.shatteredpixeldungeon.ShatteredPixelDungeon;
|
||||||
|
import com.shatteredpixel.shatteredpixeldungeon.scenes.PixelScene;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.scenes.TitleScene;
|
import com.shatteredpixel.shatteredpixeldungeon.scenes.TitleScene;
|
||||||
import com.watabou.noosa.Game;
|
import com.watabou.noosa.Game;
|
||||||
import com.watabou.noosa.Image;
|
import com.watabou.noosa.Image;
|
||||||
|
@ -36,8 +37,8 @@ public class ExitButton extends Button {
|
||||||
public ExitButton() {
|
public ExitButton() {
|
||||||
super();
|
super();
|
||||||
|
|
||||||
width = image.width+4;
|
width = 20;
|
||||||
height = image.height+4;
|
height = 20;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -52,8 +53,9 @@ public class ExitButton extends Button {
|
||||||
protected void layout() {
|
protected void layout() {
|
||||||
super.layout();
|
super.layout();
|
||||||
|
|
||||||
image.x = x+2;
|
image.x = x + (width - image.width)/2f;
|
||||||
image.y = y+2;
|
image.y = y + (height - image.height)/2f;
|
||||||
|
PixelScene.align(image);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -26,44 +26,52 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.hero.HeroClass;
|
||||||
import com.watabou.noosa.Image;
|
import com.watabou.noosa.Image;
|
||||||
|
|
||||||
public enum Icons {
|
public enum Icons {
|
||||||
|
|
||||||
|
//button icons
|
||||||
|
CHECKED,
|
||||||
|
UNCHECKED,
|
||||||
|
INFO,
|
||||||
|
CHALLENGE_OFF,
|
||||||
|
CHALLENGE_ON,
|
||||||
|
PREFS,
|
||||||
|
LANGS,
|
||||||
|
EXIT,
|
||||||
|
CLOSE,
|
||||||
|
ARROW,
|
||||||
|
|
||||||
|
//ingame UI icons
|
||||||
SKULL,
|
SKULL,
|
||||||
BUSY,
|
BUSY,
|
||||||
COMPASS,
|
COMPASS,
|
||||||
INFO,
|
|
||||||
PREFS,
|
|
||||||
WARNING,
|
|
||||||
TARGET,
|
|
||||||
MASTERY,
|
|
||||||
WATA,
|
|
||||||
WARRIOR,
|
|
||||||
MAGE,
|
|
||||||
ROGUE,
|
|
||||||
HUNTRESS,
|
|
||||||
CLOSE,
|
|
||||||
DEPTH,
|
|
||||||
SLEEP,
|
SLEEP,
|
||||||
ALERT,
|
ALERT,
|
||||||
LOST,
|
LOST,
|
||||||
|
TARGET,
|
||||||
BACKPACK,
|
BACKPACK,
|
||||||
SEED_POUCH,
|
SEED_POUCH,
|
||||||
SCROLL_HOLDER,
|
SCROLL_HOLDER,
|
||||||
POTION_BANDOLIER,
|
POTION_BANDOLIER,
|
||||||
WAND_HOLSTER,
|
WAND_HOLSTER,
|
||||||
CHECKED,
|
|
||||||
UNCHECKED,
|
//hero & rankings icons
|
||||||
EXIT,
|
DEPTH,
|
||||||
NOTES,
|
WARRIOR,
|
||||||
LANGS,
|
MAGE,
|
||||||
CHALLENGE_OFF,
|
ROGUE,
|
||||||
CHALLENGE_ON,
|
HUNTRESS,
|
||||||
RESUME,
|
|
||||||
|
//main menu icons
|
||||||
ENTER,
|
ENTER,
|
||||||
GOLD,
|
GOLD,
|
||||||
RANKINGS,
|
RANKINGS,
|
||||||
BADGES,
|
BADGES,
|
||||||
CHANGES,
|
CHANGES,
|
||||||
SHPX;
|
SHPX,
|
||||||
|
|
||||||
|
//misc icons
|
||||||
|
LIBGDX,
|
||||||
|
WATA,
|
||||||
|
WARNING;
|
||||||
|
|
||||||
public Image get() {
|
public Image get() {
|
||||||
return get( this );
|
return get( this );
|
||||||
|
@ -72,113 +80,117 @@ public enum Icons {
|
||||||
public static Image get( Icons type ) {
|
public static Image get( Icons type ) {
|
||||||
Image icon = new Image( Assets.ICONS );
|
Image icon = new Image( Assets.ICONS );
|
||||||
switch (type) {
|
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:
|
case CHECKED:
|
||||||
icon.frame( icon.texture.uvRect( 54, 12, 66, 24 ) );
|
icon.frame( icon.texture.uvRect( 0, 0, 12, 12 ) );
|
||||||
break;
|
break;
|
||||||
case UNCHECKED:
|
case UNCHECKED:
|
||||||
icon.frame( icon.texture.uvRect( 66, 12, 78, 24 ) );
|
icon.frame( icon.texture.uvRect( 16, 0, 28, 12 ) );
|
||||||
break;
|
break;
|
||||||
case EXIT:
|
case INFO:
|
||||||
icon.frame( icon.texture.uvRect( 108, 0, 124, 16 ) );
|
icon.frame( icon.texture.uvRect( 32, 0, 46, 14 ) );
|
||||||
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 ) );
|
|
||||||
break;
|
break;
|
||||||
case CHALLENGE_ON:
|
case CHALLENGE_ON:
|
||||||
icon.frame( icon.texture.uvRect( 92, 12, 108, 24 ) );
|
icon.frame( icon.texture.uvRect( 48, 0, 62, 12 ) );
|
||||||
break;
|
break;
|
||||||
case RESUME:
|
case CHALLENGE_OFF:
|
||||||
icon.frame( icon.texture.uvRect( 13, 53, 24, 64 ) );
|
icon.frame( icon.texture.uvRect( 64, 0, 78, 12 ) );
|
||||||
break;
|
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:
|
case ENTER:
|
||||||
icon.frame( icon.texture.uvRect( 66, 26, 83, 43 ) );
|
icon.frame( icon.texture.uvRect( 0, 64, 17, 81 ) );
|
||||||
break;
|
|
||||||
case GOLD:
|
|
||||||
icon.frame( icon.texture.uvRect( 83, 26, 100, 42 ) );
|
|
||||||
break;
|
break;
|
||||||
case RANKINGS:
|
case RANKINGS:
|
||||||
icon.frame( icon.texture.uvRect( 100, 26, 117, 43 ) );
|
icon.frame( icon.texture.uvRect( 17, 64, 34, 81 ) );
|
||||||
break;
|
break;
|
||||||
case BADGES:
|
case BADGES:
|
||||||
icon.frame( icon.texture.uvRect( 66, 46, 83, 63 ) );
|
icon.frame( icon.texture.uvRect( 34, 64, 51, 81 ) );
|
||||||
break;
|
break;
|
||||||
case CHANGES:
|
case CHANGES:
|
||||||
icon.frame( icon.texture.uvRect( 83, 47, 100, 62 ) );
|
icon.frame( icon.texture.uvRect( 51, 64, 68, 79 ) );
|
||||||
break;
|
break;
|
||||||
case SHPX:
|
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;
|
break;
|
||||||
}
|
}
|
||||||
return icon;
|
return icon;
|
||||||
|
|
|
@ -122,10 +122,10 @@ public class QuickRecipe extends Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (cost > 0) {
|
if (cost > 0) {
|
||||||
arrow = new arrow(Icons.get(Icons.RESUME), cost);
|
arrow = new arrow(Icons.get(Icons.ARROW), cost);
|
||||||
arrow.hardlightText(0x00CCFF);
|
arrow.hardlightText(0x00CCFF);
|
||||||
} else {
|
} else {
|
||||||
arrow = new arrow(Icons.get(Icons.RESUME));
|
arrow = new arrow(Icons.get(Icons.ARROW));
|
||||||
}
|
}
|
||||||
if (hasInputs) {
|
if (hasInputs) {
|
||||||
arrow.icon.tint(1, 1, 0, 1);
|
arrow.icon.tint(1, 1, 0, 1);
|
||||||
|
|
|
@ -42,7 +42,7 @@ public class ResumeIndicator extends Tag {
|
||||||
protected void createChildren() {
|
protected void createChildren() {
|
||||||
super.createChildren();
|
super.createChildren();
|
||||||
|
|
||||||
icon = Icons.get( Icons.RESUME );
|
icon = Icons.get( Icons.ARROW);
|
||||||
add( icon );
|
add( icon );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user