v1.1.0: tabs in WndRanking and WndHero now use icons, not text
This commit is contained in:
parent
8a86dc776a
commit
ad0242fb3d
Binary file not shown.
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 13 KiB |
|
@ -44,6 +44,8 @@ public enum Icons {
|
||||||
AUDIO,
|
AUDIO,
|
||||||
TALENT,
|
TALENT,
|
||||||
MAGNIFY,
|
MAGNIFY,
|
||||||
|
BUFFS,
|
||||||
|
BACKPACK_LRG,
|
||||||
|
|
||||||
//ingame UI icons
|
//ingame UI icons
|
||||||
SKULL,
|
SKULL,
|
||||||
|
@ -142,6 +144,13 @@ public enum Icons {
|
||||||
case MAGNIFY:
|
case MAGNIFY:
|
||||||
icon.frame( icon.texture.uvRect( 96, 16, 110, 30 ) );
|
icon.frame( icon.texture.uvRect( 96, 16, 110, 30 ) );
|
||||||
break;
|
break;
|
||||||
|
case BUFFS:
|
||||||
|
icon.frame( icon.texture.uvRect( 110, 16, 128, 31 ) );
|
||||||
|
break;
|
||||||
|
case BACKPACK_LRG:
|
||||||
|
icon.frame( icon.texture.uvRect( 64, 80, 80, 96 ) );
|
||||||
|
break;
|
||||||
|
|
||||||
case SKULL:
|
case SKULL:
|
||||||
icon.frame( icon.texture.uvRect( 0, 32, 8, 40 ) );
|
icon.frame( icon.texture.uvRect( 0, 32, 8, 40 ) );
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -79,14 +79,14 @@ public class WndHero extends WndTabbed {
|
||||||
buffs.setRect(0, 0, WIDTH, HEIGHT);
|
buffs.setRect(0, 0, WIDTH, HEIGHT);
|
||||||
buffs.setupList();
|
buffs.setupList();
|
||||||
|
|
||||||
add( new LabeledTab( Messages.get(this, "stats") ) {
|
add( new IconTab( Icons.get(Icons.RANKINGS) ) {
|
||||||
protected void select( boolean value ) {
|
protected void select( boolean value ) {
|
||||||
super.select( value );
|
super.select( value );
|
||||||
if (selected) lastIdx = 0;
|
if (selected) lastIdx = 0;
|
||||||
stats.visible = stats.active = selected;
|
stats.visible = stats.active = selected;
|
||||||
}
|
}
|
||||||
} );
|
} );
|
||||||
add( new LabeledTab( Messages.get(this, "talents") ) {
|
add( new IconTab( Icons.get(Icons.TALENT) ) {
|
||||||
protected void select( boolean value ) {
|
protected void select( boolean value ) {
|
||||||
super.select( value );
|
super.select( value );
|
||||||
if (selected) lastIdx = 1;
|
if (selected) lastIdx = 1;
|
||||||
|
@ -94,7 +94,7 @@ public class WndHero extends WndTabbed {
|
||||||
talents.visible = talents.active = selected;
|
talents.visible = talents.active = selected;
|
||||||
}
|
}
|
||||||
} );
|
} );
|
||||||
add( new LabeledTab( Messages.get(this, "buffs") ) {
|
add( new IconTab( Icons.get(Icons.BUFFS) ) {
|
||||||
protected void select( boolean value ) {
|
protected void select( boolean value ) {
|
||||||
super.select( value );
|
super.select( value );
|
||||||
if (selected) lastIdx = 2;
|
if (selected) lastIdx = 2;
|
||||||
|
|
|
@ -120,8 +120,8 @@ public class WndRanking extends WndTabbed {
|
||||||
|
|
||||||
private void createControls() {
|
private void createControls() {
|
||||||
|
|
||||||
String[] labels =
|
Icons[] icons =
|
||||||
{Messages.get(this, "stats"), Messages.get(this, "items"), Messages.get(this, "badges")};
|
{Icons.RANKINGS, Icons.BACKPACK_LRG, Icons.BADGES};
|
||||||
Group[] pages =
|
Group[] pages =
|
||||||
{new StatsTab(), new ItemsTab(), new BadgesTab()};
|
{new StatsTab(), new ItemsTab(), new BadgesTab()};
|
||||||
|
|
||||||
|
@ -129,7 +129,7 @@ public class WndRanking extends WndTabbed {
|
||||||
|
|
||||||
add( pages[i] );
|
add( pages[i] );
|
||||||
|
|
||||||
Tab tab = new RankingTab( labels[i], pages[i] );
|
Tab tab = new RankingTab( icons[i], pages[i] );
|
||||||
add( tab );
|
add( tab );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -138,12 +138,12 @@ public class WndRanking extends WndTabbed {
|
||||||
select( 0 );
|
select( 0 );
|
||||||
}
|
}
|
||||||
|
|
||||||
private class RankingTab extends LabeledTab {
|
private class RankingTab extends IconTab {
|
||||||
|
|
||||||
private Group page;
|
private Group page;
|
||||||
|
|
||||||
public RankingTab( String label, Group page ) {
|
public RankingTab( Icons icon, Group page ) {
|
||||||
super( label );
|
super( Icons.get(icon) );
|
||||||
this.page = page;
|
this.page = page;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user