v0.3.0: some refactoring to item sprites to better use an item as a parameter
This commit is contained in:
@@ -45,7 +45,7 @@ public class IconTitle extends Component {
|
||||
|
||||
public IconTitle( Item item ) {
|
||||
this(
|
||||
new ItemSprite( item.image(), item.glowing() ),
|
||||
new ItemSprite( item ),
|
||||
Utils.capitalize( item.toString() ) );
|
||||
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@ public class WndItem extends Window {
|
||||
super();
|
||||
|
||||
IconTitle titlebar = new IconTitle();
|
||||
titlebar.icon( new ItemSprite( item.image(), item.glowing() ) );
|
||||
titlebar.icon( new ItemSprite( item ) );
|
||||
titlebar.label( Utils.capitalize( item.toString() ) );
|
||||
titlebar.setRect( 0, 0, WIDTH, 0 );
|
||||
add( titlebar );
|
||||
|
||||
@@ -205,7 +205,7 @@ public class WndTradeItem extends Window {
|
||||
|
||||
// Title
|
||||
IconTitle titlebar = new IconTitle();
|
||||
titlebar.icon( new ItemSprite( item.image(), item.glowing() ) );
|
||||
titlebar.icon( new ItemSprite( item ) );
|
||||
titlebar.label( forSale ?
|
||||
Utils.format( TXT_SALE, item.toString(), price( item ) ) :
|
||||
Utils.capitalize( item.toString() ) );
|
||||
|
||||
Reference in New Issue
Block a user