v0.3.4: further layout improvements to wndItem
This commit is contained in:
parent
ddbca97f59
commit
560070fcd0
|
@ -36,9 +36,15 @@ public class RedButton extends Button {
|
||||||
protected Image icon;
|
protected Image icon;
|
||||||
|
|
||||||
public RedButton( String label ) {
|
public RedButton( String label ) {
|
||||||
|
this(label, 9);
|
||||||
|
}
|
||||||
|
|
||||||
|
public RedButton( String label, int size ){
|
||||||
super();
|
super();
|
||||||
|
|
||||||
|
text = PixelScene.renderText( size );
|
||||||
text.text( label );
|
text.text( label );
|
||||||
|
add( text );
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -47,9 +53,6 @@ public class RedButton extends Button {
|
||||||
|
|
||||||
bg = Chrome.get( Chrome.Type.BUTTON );
|
bg = Chrome.get( Chrome.Type.BUTTON );
|
||||||
add( bg );
|
add( bg );
|
||||||
|
|
||||||
text = PixelScene.renderText( 9 );
|
|
||||||
add( text );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -67,7 +67,7 @@ public class WndItem extends Window {
|
||||||
if (Dungeon.hero.isAlive() && owner != null) {
|
if (Dungeon.hero.isAlive() && owner != null) {
|
||||||
for (final String action:item.actions( Dungeon.hero )) {
|
for (final String action:item.actions( Dungeon.hero )) {
|
||||||
|
|
||||||
RedButton btn = new RedButton( Messages.get(item, "ac_" + action) ) {
|
RedButton btn = new RedButton( Messages.get(item, "ac_" + action), 8 ) {
|
||||||
@Override
|
@Override
|
||||||
protected void onClick() {
|
protected void onClick() {
|
||||||
item.execute( Dungeon.hero, action );
|
item.execute( Dungeon.hero, action );
|
||||||
|
|
Loading…
Reference in New Issue
Block a user