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:
parent
12e2f13808
commit
ad32c4d984
|
@ -60,12 +60,12 @@ public class AboutScene extends PixelScene {
|
||||||
shpx.y = align( 30 );
|
shpx.y = align( 30 );
|
||||||
add( shpx );
|
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 );
|
BitmapTextMultiline shpxtitle = createMultiline( TTL_SHPX, 8 );
|
||||||
shpxtitle.maxWidth = Math.min( Camera.main.width, 120 );
|
shpxtitle.maxWidth = Math.min( Camera.main.width, 120 );
|
||||||
shpxtitle.measure();
|
shpxtitle.measure();
|
||||||
shpxtitle.hardlight( 0x50a500 );
|
shpxtitle.hardlight( Window.SHPX_COLOR );
|
||||||
add( shpxtitle );
|
add( shpxtitle );
|
||||||
|
|
||||||
shpxtitle.x = align( (Camera.main.width - shpxtitle.width()) / 2 );
|
shpxtitle.x = align( (Camera.main.width - shpxtitle.width()) / 2 );
|
||||||
|
@ -82,7 +82,7 @@ public class AboutScene extends PixelScene {
|
||||||
BitmapTextMultiline shpxlink = createMultiline( LNK_SHPX, 8 );
|
BitmapTextMultiline shpxlink = createMultiline( LNK_SHPX, 8 );
|
||||||
shpxlink.maxWidth = Math.min( Camera.main.width, 120 );
|
shpxlink.maxWidth = Math.min( Camera.main.width, 120 );
|
||||||
shpxlink.measure();
|
shpxlink.measure();
|
||||||
shpxlink.hardlight( 0x57b300 );
|
shpxlink.hardlight( Window.SHPX_COLOR );
|
||||||
add( shpxlink );
|
add( shpxlink );
|
||||||
|
|
||||||
shpxlink.x = shpxtext.x;
|
shpxlink.x = shpxtext.x;
|
||||||
|
|
|
@ -38,7 +38,7 @@ import com.shatteredpixel.shatteredpixeldungeon.windows.WndRanking;
|
||||||
|
|
||||||
public class RankingsScene extends PixelScene {
|
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_TOTAL = "Total games played: %d";
|
||||||
private static final String TXT_NO_GAMES = "No games have been played yet.";
|
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 );
|
float top = align( (h - ROW_HEIGHT * Rankings.INSTANCE.records.size()) / 2 );
|
||||||
|
|
||||||
BitmapText title = PixelScene.createText( TXT_TITLE, 9 );
|
BitmapText title = PixelScene.createText( TXT_TITLE, 9 );
|
||||||
title.hardlight( Window.TITLE_COLOR );
|
title.hardlight( Window.SHPX_COLOR );
|
||||||
title.measure();
|
title.measure();
|
||||||
title.x = align( (w - title.width()) / 2 );
|
title.x = align( (w - title.width()) / 2 );
|
||||||
title.y = align( top - title.height() - GAP );
|
title.y = align( top - title.height() - GAP );
|
||||||
|
|
|
@ -41,6 +41,7 @@ public class Window extends Group implements Signal.Listener<Key> {
|
||||||
protected NinePatch chrome;
|
protected NinePatch chrome;
|
||||||
|
|
||||||
public static final int TITLE_COLOR = 0xFFFF44;
|
public static final int TITLE_COLOR = 0xFFFF44;
|
||||||
|
public static final int SHPX_COLOR = 0x33BB33;
|
||||||
|
|
||||||
public Window() {
|
public Window() {
|
||||||
this( 0, 0, Chrome.get( Chrome.Type.WINDOW ) );
|
this( 0, 0, Chrome.get( Chrome.Type.WINDOW ) );
|
||||||
|
|
|
@ -19,6 +19,8 @@ package com.shatteredpixel.shatteredpixeldungeon.windows;
|
||||||
|
|
||||||
import java.util.Locale;
|
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.SmartTexture;
|
||||||
import com.watabou.gltextures.TextureCache;
|
import com.watabou.gltextures.TextureCache;
|
||||||
import com.watabou.noosa.BitmapText;
|
import com.watabou.noosa.BitmapText;
|
||||||
|
@ -104,10 +106,11 @@ public class WndHero extends WndTabbed {
|
||||||
|
|
||||||
Hero hero = Dungeon.hero;
|
Hero hero = Dungeon.hero;
|
||||||
|
|
||||||
BitmapText title = PixelScene.createText(
|
IconTitle title = new IconTitle();
|
||||||
Utils.format( TXT_TITLE, hero.lvl, hero.className() ).toUpperCase( Locale.ENGLISH ), 9 );
|
title.icon( HeroSprite.avatar(hero.heroClass, hero.tier()) );
|
||||||
title.hardlight( TITLE_COLOR );
|
title.label(Utils.format( TXT_TITLE, hero.lvl, hero.className() ).toUpperCase( Locale.ENGLISH ), 9);
|
||||||
title.measure();
|
title.color(Window.SHPX_COLOR);
|
||||||
|
title.setRect( 0, 0, WIDTH, 0 );
|
||||||
add(title);
|
add(title);
|
||||||
|
|
||||||
RedButton btnCatalogus = new RedButton( TXT_CATALOGUS ) {
|
RedButton btnCatalogus = new RedButton( TXT_CATALOGUS ) {
|
||||||
|
@ -117,7 +120,7 @@ public class WndHero extends WndTabbed {
|
||||||
GameScene.show( new WndCatalogus() );
|
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 );
|
add( btnCatalogus );
|
||||||
|
|
||||||
RedButton btnJournal = new RedButton( TXT_JOURNAL ) {
|
RedButton btnJournal = new RedButton( TXT_JOURNAL ) {
|
||||||
|
|
|
@ -19,6 +19,7 @@ package com.shatteredpixel.shatteredpixeldungeon.windows;
|
||||||
|
|
||||||
import java.util.Locale;
|
import java.util.Locale;
|
||||||
|
|
||||||
|
import com.shatteredpixel.shatteredpixeldungeon.ui.*;
|
||||||
import com.watabou.noosa.BitmapText;
|
import com.watabou.noosa.BitmapText;
|
||||||
import com.watabou.noosa.ColorBlock;
|
import com.watabou.noosa.ColorBlock;
|
||||||
import com.watabou.noosa.Game;
|
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.items.Item;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.scenes.PixelScene;
|
import com.shatteredpixel.shatteredpixeldungeon.scenes.PixelScene;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.HeroSprite;
|
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;
|
import com.shatteredpixel.shatteredpixeldungeon.utils.Utils;
|
||||||
|
|
||||||
public class WndRanking extends WndTabbed {
|
public class WndRanking extends WndTabbed {
|
||||||
|
@ -141,7 +138,7 @@ public class WndRanking extends WndTabbed {
|
||||||
|
|
||||||
private static final int GAP = 4;
|
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_HEALTH = "Health";
|
||||||
private static final String TXT_STR = "Strength";
|
private static final String TXT_STR = "Strength";
|
||||||
|
@ -164,6 +161,7 @@ public class WndRanking extends WndTabbed {
|
||||||
IconTitle title = new IconTitle();
|
IconTitle title = new IconTitle();
|
||||||
title.icon( HeroSprite.avatar( Dungeon.hero.heroClass, Dungeon.hero.tier() ) );
|
title.icon( HeroSprite.avatar( Dungeon.hero.heroClass, Dungeon.hero.tier() ) );
|
||||||
title.label( Utils.format( TXT_TITLE, Dungeon.hero.lvl, heroClass ).toUpperCase( Locale.ENGLISH ) );
|
title.label( Utils.format( TXT_TITLE, Dungeon.hero.lvl, heroClass ).toUpperCase( Locale.ENGLISH ) );
|
||||||
|
title.color(Window.SHPX_COLOR);
|
||||||
title.setRect( 0, 0, WIDTH, 0 );
|
title.setRect( 0, 0, WIDTH, 0 );
|
||||||
add( title );
|
add( title );
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user