v0.3.5: added some basic tutorial stuff for the mage and warrior's items

This commit is contained in:
Evan Debenham
2016-04-18 16:25:59 -04:00
parent b4d78ada9d
commit 83711cc836
6 changed files with 131 additions and 62 deletions
@@ -42,8 +42,12 @@ public class WndItem extends Window {
private static final int WIDTH_P = 120;
private static final int WIDTH_L = 144;
public WndItem( final WndBag owner, final Item item ){
this( owner, item, owner != null );
}
public WndItem( final WndBag owner, final Item item ) {
public WndItem( final WndBag owner, final Item item , final boolean options ) {
super();
@@ -67,7 +71,7 @@ public class WndItem extends Window {
float y = info.top() + info.height() + GAP;
float x = 0;
if (Dungeon.hero.isAlive() && owner != null) {
if (Dungeon.hero.isAlive() && options) {
ArrayList<RedButton> line = new ArrayList<>();
for (final String action:item.actions( Dungeon.hero )) {
@@ -75,7 +79,7 @@ public class WndItem extends Window {
@Override
protected void onClick() {
hide();
owner.hide();
if (owner != null) owner.hide();
item.execute( Dungeon.hero, action );
};
};