Search in sources :

Example 1 with OPERATIONS

use of eidolons.client.cc.gui.lists.dc.DC_InventoryManager.OPERATIONS in project Eidolons by IDemiurge.

the class InventoryClickHandlerImpl method cellClicked.

@Override
public boolean cellClicked(CELL_TYPE cell_type, int clickCount, boolean rightClick, boolean altClick, Entity cellContents) {
    boolean result = false;
    OPERATIONS operation = getOperation(cell_type, clickCount, rightClick, altClick, cellContents);
    if (operation == null) {
        result = false;
    } else {
        // if (arg == null) return false;
        if (Eidolons.game.getInventoryManager().tryExecuteOperation(operation, cellContents)) {
            dirty = true;
            result = true;
        }
    }
    if (result) {
        GuiEventManager.trigger(GuiEventType.SHOW_INVENTORY, new InventoryDataSource(unit));
    }
    return result;
}
Also used : InventoryDataSource(eidolons.libgdx.gui.panels.dc.inventory.datasource.InventoryDataSource) OPERATIONS(eidolons.client.cc.gui.lists.dc.DC_InventoryManager.OPERATIONS)

Aggregations

OPERATIONS (eidolons.client.cc.gui.lists.dc.DC_InventoryManager.OPERATIONS)1 InventoryDataSource (eidolons.libgdx.gui.panels.dc.inventory.datasource.InventoryDataSource)1