diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/DriedRose.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/DriedRose.java index aba9af54e..ae3d55562 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/DriedRose.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/DriedRose.java @@ -68,6 +68,7 @@ import com.shatteredpixel.shatteredpixeldungeon.ui.Window; import com.shatteredpixel.shatteredpixeldungeon.utils.GLog; import com.shatteredpixel.shatteredpixeldungeon.windows.IconTitle; import com.shatteredpixel.shatteredpixeldungeon.windows.WndBag; +import com.shatteredpixel.shatteredpixeldungeon.windows.WndInfoItem; import com.shatteredpixel.shatteredpixeldungeon.windows.WndQuest; import com.shatteredpixel.shatteredpixeldungeon.windows.WndUseItem; import com.watabou.noosa.Game; @@ -936,6 +937,15 @@ public class DriedRose extends Artifact { }); } } + + @Override + protected boolean onLongClick() { + if (item() != null && item().name() != null){ + GameScene.show(new WndInfoItem(item())); + return true; + } + return false; + } }; btnWeapon.setRect( (WIDTH - BTN_GAP) / 2 - BTN_SIZE, message.top() + message.height() + GAP, BTN_SIZE, BTN_SIZE ); if (rose.weapon != null) { diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/ItemButton.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/ItemButton.java index b8df74cea..cf7c85519 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/ItemButton.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/ItemButton.java @@ -57,6 +57,11 @@ public class ItemButton extends Component { protected void onClick() { ItemButton.this.onClick(); } + + @Override + protected boolean onLongClick() { + return ItemButton.this.onLongClick(); + } }; slot.enable(true); add(slot); @@ -64,6 +69,10 @@ public class ItemButton extends Component { protected void onClick() {} + protected boolean onLongClick(){ + return false; + } + @Override protected void layout() { super.layout();