v2.3.0: long-pressing in ghost equip window now shows item info
This commit is contained in:
@@ -68,6 +68,7 @@ import com.shatteredpixel.shatteredpixeldungeon.ui.Window;
|
|||||||
import com.shatteredpixel.shatteredpixeldungeon.utils.GLog;
|
import com.shatteredpixel.shatteredpixeldungeon.utils.GLog;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.windows.IconTitle;
|
import com.shatteredpixel.shatteredpixeldungeon.windows.IconTitle;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.windows.WndBag;
|
import com.shatteredpixel.shatteredpixeldungeon.windows.WndBag;
|
||||||
|
import com.shatteredpixel.shatteredpixeldungeon.windows.WndInfoItem;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.windows.WndQuest;
|
import com.shatteredpixel.shatteredpixeldungeon.windows.WndQuest;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.windows.WndUseItem;
|
import com.shatteredpixel.shatteredpixeldungeon.windows.WndUseItem;
|
||||||
import com.watabou.noosa.Game;
|
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 );
|
btnWeapon.setRect( (WIDTH - BTN_GAP) / 2 - BTN_SIZE, message.top() + message.height() + GAP, BTN_SIZE, BTN_SIZE );
|
||||||
if (rose.weapon != null) {
|
if (rose.weapon != null) {
|
||||||
|
|||||||
@@ -57,6 +57,11 @@ public class ItemButton extends Component {
|
|||||||
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);
|
||||||
@@ -64,6 +69,10 @@ public class ItemButton extends Component {
|
|||||||
|
|
||||||
protected void onClick() {}
|
protected void onClick() {}
|
||||||
|
|
||||||
|
protected boolean onLongClick(){
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void layout() {
|
protected void layout() {
|
||||||
super.layout();
|
super.layout();
|
||||||
|
|||||||
Reference in New Issue
Block a user