v0.3.0: added sprite emitter functionality to item sprites in all cases
This commit is contained in:
@@ -44,10 +44,10 @@ public class IconTitle extends Component {
|
||||
}
|
||||
|
||||
public IconTitle( Item item ) {
|
||||
this(
|
||||
new ItemSprite( item ),
|
||||
Utils.capitalize( item.toString() ) );
|
||||
|
||||
ItemSprite icon = new ItemSprite();
|
||||
icon( icon );
|
||||
label( Utils.capitalize( item.toString() ) );
|
||||
icon.view( item );
|
||||
}
|
||||
|
||||
public IconTitle( Image icon, String label ) {
|
||||
|
||||
@@ -40,9 +40,7 @@ public class WndItem extends Window {
|
||||
|
||||
super();
|
||||
|
||||
IconTitle titlebar = new IconTitle();
|
||||
titlebar.icon( new ItemSprite( item ) );
|
||||
titlebar.label( Utils.capitalize( item.toString() ) );
|
||||
IconTitle titlebar = new IconTitle( item );
|
||||
titlebar.setRect( 0, 0, WIDTH, 0 );
|
||||
add( titlebar );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user