Search in sources :

Example 1 with AT_OBJ_TYPE

use of main.logic.AT_OBJ_TYPE in project Eidolons by IDemiurge.

the class GatewayButtonHandler method handleCommand.

public void handleCommand(String command, int i) {
    AT_OBJ_TYPE type;
    boolean alt = ActionEvent.ALT_MASK == (i & ActionEvent.ALT_MASK);
    switch(command) {
        case PARSE_CAPTURE:
            if (alt) {
                CaptureParser.newCapture(AT_OBJ_TYPE.DIRECTION);
            }
            CaptureParser.newCapture(null);
            break;
        case GATEWAY:
            window.getView().refresh();
            break;
        case NEW_SESSION:
            SessionMaster.newSession(alt);
            break;
        case CONTINUE_SESSION:
            SessionMaster.continueSession(alt);
            break;
        case LAUNCH_AV:
            ArcaneTower.launchAV();
            break;
        case CLEAN_UP:
            if (alt) {
                String choice = ListChooser.chooseEnum(AT_OBJ_TYPE.class, SELECTION_MODE.MULTIPLE);
                List<AT_OBJ_TYPE> types = new EnumMaster<AT_OBJ_TYPE>().getEnumList(AT_OBJ_TYPE.class, choice);
                MainWriter.cleanUp(true, types.toArray(new AT_OBJ_TYPE[types.size()]));
            } else {
                MainWriter.cleanUpAll();
            }
            break;
        case CREATE_TYPE:
            String chooseEnum = ListChooser.chooseEnum(AT_OBJ_TYPE.class);
            type = (AT_OBJ_TYPE) ContentManager.getOBJ_TYPE(chooseEnum);
            CreationHelper.create(type);
            break;
        case SAVE_TYPES:
            ArcaneTower.saveAll();
            break;
    }
}
Also used : AT_OBJ_TYPE(main.logic.AT_OBJ_TYPE)

Example 2 with AT_OBJ_TYPE

use of main.logic.AT_OBJ_TYPE in project Eidolons by IDemiurge.

the class VersionMaster method saveVersionFolder.

public static void saveVersionFolder(boolean dirtyOnly) {
    for (AT_OBJ_TYPE T : AT_OBJ_TYPE.values()) {
        if (!T.isVersioned()) {
            continue;
        }
        XML_Writer.setCustomPath(getPath() + getVersion());
        XML_Writer.setDirtyOnly(dirtyOnly);
        try {
            XML_Writer.writeXML_ForTypeGroup(T);
        } catch (Exception e) {
            main.system.ExceptionMaster.printStackTrace(e);
        } finally {
            XML_Writer.setCustomPath(null);
            XML_Writer.setDirtyOnly(false);
        }
    }
}
Also used : AT_OBJ_TYPE(main.logic.AT_OBJ_TYPE)

Aggregations

AT_OBJ_TYPE (main.logic.AT_OBJ_TYPE)2