use of eidolons.libgdx.gui.panels.dc.inventory.datasource.InventoryDataSource in project Eidolons by IDemiurge.
the class InventoryWithAction method close.
public void close(Boolean result) {
if (result == null)
result = false;
InventoryDataSource source = (InventoryDataSource) getUserObject();
WaitMaster.receiveInput(InventoryTransactionManager.OPERATION, result);
CharacterCreator.getHeroManager().removeHero(source.getUnit());
if (!ExplorationMaster.isExplorationOn()) {
source.getCancelHandler().cancel();
} else {
}
setVisible(false);
}
use of eidolons.libgdx.gui.panels.dc.inventory.datasource.InventoryDataSource in project Eidolons by IDemiurge.
the class InventoryWithAction method initButtonListeners.
private void initButtonListeners() {
final InventoryDataSource source = (InventoryDataSource) getUserObject();
ButtonStyled button = (ButtonStyled) doneButton.getActor();
button.clearListeners();
button.addListener(source.getDoneHandler());
// button.setDisabled(source.isDoneDisabled());
// button = (ButtonStyled) cancelButton.getActor();
// button.addListener(source.getCancelHandler());
// button.setDisabled(source.isCancelDisabled());
// button = (ButtonStyled) undoButton.getActor();
// button.addListener(source.getUndoHandler());
// button.setDisabled(source.isUndoDisabled());
}
use of eidolons.libgdx.gui.panels.dc.inventory.datasource.InventoryDataSource in project Eidolons by IDemiurge.
the class ContainerMaster method actionActivated.
@Override
protected boolean actionActivated(CONTAINER_ACTION sub, Unit unit, DungeonObj obj) {
/*
pickUpAction
*/
unit.getGame().getInventoryManager().setHero(unit);
unit.getGame().getInventoryManager().setOperationsPool(5);
CharacterCreator.getHeroManager().addHero(unit);
Pair<InventoryDataSource, ContainerDataSource> param = new ImmutablePair<>(new InventoryDataSource(unit), new ContainerDataSource(obj, unit));
GuiEventManager.trigger(GuiEventType.SHOW_LOOT_PANEL, param);
// return true;
return (boolean) WaitMaster.waitForInput(InventoryTransactionManager.OPERATION);
}
Aggregations