Added support for using VendorPanel for gambling

Added support for using VendorPanel for gambling
TBD if this will require any major modifications
This commit is contained in:
Collin Smith
2020-07-04 02:32:26 -07:00
parent 0af512b3f4
commit 0b38050429
2 changed files with 8 additions and 1 deletions

View File

@ -135,7 +135,13 @@ public class Npc extends AI {
}
if (GAMBLERS.contains(entType)) {
menu.addItem(3398, new ClickListener()); // gamble
menu.addItem(3398, new ClickListener() { // gamble
@Override
public void clicked(InputEvent event, float x, float y) {
Riiablo.game.vendorPanel.config(VendorPanel.GAMBLER);
Riiablo.game.setLeftPanel(Riiablo.game.vendorPanel);
}
});
}
menu.addCancel(new NpcMenu.CancellationListener() {

View File

@ -35,6 +35,7 @@ public class VendorPanel extends WidgetGroup implements Disposable {
public static final int REPAIRER = REPAIR | REPAIR_ALL;
public static final int TRADER = BUYSELL | EXIT;
public static final int SMITHY = BUYSELL | REPAIRER;
public static final int GAMBLER = TRADER;
static final int BLANK_MASKS[] = {
BUY,