v0.9.0b: long-pressing item buttons in alchemy now shows a desc window
This commit is contained in:
parent
5885359d5a
commit
f59073b4b0
|
@ -153,6 +153,15 @@ public class AlchemyScene extends PixelScene {
|
||||||
}
|
}
|
||||||
AlchemyScene.this.addToFront(WndBag.lastBag( itemSelector, WndBag.Mode.ALCHEMY, Messages.get(AlchemyScene.class, "select")));
|
AlchemyScene.this.addToFront(WndBag.lastBag( itemSelector, WndBag.Mode.ALCHEMY, Messages.get(AlchemyScene.class, "select")));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected boolean onLongClick() {
|
||||||
|
if (item != null){
|
||||||
|
Game.scene().addToFront(new WndInfoItem(item));
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
};
|
};
|
||||||
inputs[i].setRect(left + 10, pos, BTN_SIZE, BTN_SIZE);
|
inputs[i].setRect(left + 10, pos, BTN_SIZE, BTN_SIZE);
|
||||||
add(inputs[i]);
|
add(inputs[i]);
|
||||||
|
@ -518,12 +527,20 @@ public class AlchemyScene extends PixelScene {
|
||||||
protected void onClick() {
|
protected void onClick() {
|
||||||
ItemButton.this.onClick();
|
ItemButton.this.onClick();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected boolean onLongClick() {
|
||||||
|
return ItemButton.this.onLongClick();
|
||||||
|
}
|
||||||
};
|
};
|
||||||
slot.enable(true);
|
slot.enable(true);
|
||||||
add( slot );
|
add( slot );
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void onClick() {}
|
protected void onClick() {}
|
||||||
|
protected boolean onLongClick() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void layout() {
|
protected void layout() {
|
||||||
|
|
|
@ -492,6 +492,9 @@ public class WndBag extends WndTabbed {
|
||||||
Dungeon.quickslot.setSlot( 0 , item );
|
Dungeon.quickslot.setSlot( 0 , item );
|
||||||
QuickSlotButton.refresh();
|
QuickSlotButton.refresh();
|
||||||
return true;
|
return true;
|
||||||
|
} else if (listener != null) {
|
||||||
|
Game.scene().addToFront(new WndInfoItem(item));
|
||||||
|
return true;
|
||||||
} else {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user