V0.2.1 : Added alternate title text to appropriate locations for Sub-Reddit modding distinctions. Standardized alternate text color int global variable. Added hero icon to hero display. make about scene flare less flashy.

This commit is contained in:
Evan Debenham 2014-10-12 00:03:23 -04:00
parent 12e2f13808
commit ad32c4d984
5 changed files with 30 additions and 28 deletions

View File

@ -60,12 +60,12 @@ public class AboutScene extends PixelScene {
shpx.y = align( 30 );
add( shpx );
new Flare( 7, 64 ).color( 0x57b300, true ).show( shpx, 0 ).angularSpeed = +20;
new Flare( 7, 64 ).color( 0x225511, true ).show( shpx, 0 ).angularSpeed = +20;
BitmapTextMultiline shpxtitle = createMultiline( TTL_SHPX, 8 );
shpxtitle.maxWidth = Math.min( Camera.main.width, 120 );
shpxtitle.measure();
shpxtitle.hardlight( 0x50a500 );
shpxtitle.hardlight( Window.SHPX_COLOR );
add( shpxtitle );
shpxtitle.x = align( (Camera.main.width - shpxtitle.width()) / 2 );
@ -82,7 +82,7 @@ public class AboutScene extends PixelScene {
BitmapTextMultiline shpxlink = createMultiline( LNK_SHPX, 8 );
shpxlink.maxWidth = Math.min( Camera.main.width, 120 );
shpxlink.measure();
shpxlink.hardlight( 0x57b300 );
shpxlink.hardlight( Window.SHPX_COLOR );
add( shpxlink );
shpxlink.x = shpxtext.x;

View File

@ -38,7 +38,7 @@ import com.shatteredpixel.shatteredpixeldungeon.windows.WndRanking;
public class RankingsScene extends PixelScene {
private static final String TXT_TITLE = "Top Rankings (SHATTERED)";
private static final String TXT_TITLE = "Top Rankings";
private static final String TXT_TOTAL = "Total games played: %d";
private static final String TXT_NO_GAMES = "No games have been played yet.";
@ -74,7 +74,7 @@ public class RankingsScene extends PixelScene {
float top = align( (h - ROW_HEIGHT * Rankings.INSTANCE.records.size()) / 2 );
BitmapText title = PixelScene.createText( TXT_TITLE, 9 );
title.hardlight( Window.TITLE_COLOR );
title.hardlight( Window.SHPX_COLOR );
title.measure();
title.x = align( (w - title.width()) / 2 );
title.y = align( top - title.height() - GAP );

View File

@ -41,6 +41,7 @@ public class Window extends Group implements Signal.Listener<Key> {
protected NinePatch chrome;
public static final int TITLE_COLOR = 0xFFFF44;
public static final int SHPX_COLOR = 0x33BB33;
public Window() {
this( 0, 0, Chrome.get( Chrome.Type.WINDOW ) );

View File

@ -19,6 +19,8 @@ package com.shatteredpixel.shatteredpixeldungeon.windows;
import java.util.Locale;
import com.shatteredpixel.shatteredpixeldungeon.sprites.HeroSprite;
import com.shatteredpixel.shatteredpixeldungeon.ui.Window;
import com.watabou.gltextures.SmartTexture;
import com.watabou.gltextures.TextureCache;
import com.watabou.noosa.BitmapText;
@ -104,11 +106,12 @@ public class WndHero extends WndTabbed {
Hero hero = Dungeon.hero;
BitmapText title = PixelScene.createText(
Utils.format( TXT_TITLE, hero.lvl, hero.className() ).toUpperCase( Locale.ENGLISH ), 9 );
title.hardlight( TITLE_COLOR );
title.measure();
add( title );
IconTitle title = new IconTitle();
title.icon( HeroSprite.avatar(hero.heroClass, hero.tier()) );
title.label(Utils.format( TXT_TITLE, hero.lvl, hero.className() ).toUpperCase( Locale.ENGLISH ), 9);
title.color(Window.SHPX_COLOR);
title.setRect( 0, 0, WIDTH, 0 );
add(title);
RedButton btnCatalogus = new RedButton( TXT_CATALOGUS ) {
@Override
@ -117,7 +120,7 @@ public class WndHero extends WndTabbed {
GameScene.show( new WndCatalogus() );
}
};
btnCatalogus.setRect( 0, title.y + title.height(), btnCatalogus.reqWidth() + 2, btnCatalogus.reqHeight() + 2 );
btnCatalogus.setRect( 0, title.height(), btnCatalogus.reqWidth() + 2, btnCatalogus.reqHeight() + 2 );
add( btnCatalogus );
RedButton btnJournal = new RedButton( TXT_JOURNAL ) {

View File

@ -19,6 +19,7 @@ package com.shatteredpixel.shatteredpixeldungeon.windows;
import java.util.Locale;
import com.shatteredpixel.shatteredpixeldungeon.ui.*;
import com.watabou.noosa.BitmapText;
import com.watabou.noosa.ColorBlock;
import com.watabou.noosa.Game;
@ -34,10 +35,6 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Belongings;
import com.shatteredpixel.shatteredpixeldungeon.items.Item;
import com.shatteredpixel.shatteredpixeldungeon.scenes.PixelScene;
import com.shatteredpixel.shatteredpixeldungeon.sprites.HeroSprite;
import com.shatteredpixel.shatteredpixeldungeon.ui.BadgesList;
import com.shatteredpixel.shatteredpixeldungeon.ui.Icons;
import com.shatteredpixel.shatteredpixeldungeon.ui.ItemSlot;
import com.shatteredpixel.shatteredpixeldungeon.ui.ScrollPane;
import com.shatteredpixel.shatteredpixeldungeon.utils.Utils;
public class WndRanking extends WndTabbed {
@ -141,7 +138,7 @@ public class WndRanking extends WndTabbed {
private static final int GAP = 4;
private static final String TXT_TITLE = "(SH)Level %d %s";
private static final String TXT_TITLE = "Level %d %s";
private static final String TXT_HEALTH = "Health";
private static final String TXT_STR = "Strength";
@ -164,6 +161,7 @@ public class WndRanking extends WndTabbed {
IconTitle title = new IconTitle();
title.icon( HeroSprite.avatar( Dungeon.hero.heroClass, Dungeon.hero.tier() ) );
title.label( Utils.format( TXT_TITLE, Dungeon.hero.lvl, heroClass ).toUpperCase( Locale.ENGLISH ) );
title.color(Window.SHPX_COLOR);
title.setRect( 0, 0, WIDTH, 0 );
add( title );