Search in sources :

Example 1 with FileChooser

use of main.swing.generic.components.editors.FileChooser in project Eidolons by IDemiurge.

the class EmitterController method setForActive.

public void setForActive() {
    String presetPath = new FileChooser(PathFinder.getSfxPath()).launch("", "");
    // ImageChooser ic = new ImageChooser();
    // ic.setDefaultFileLocation(PathFinder.getSfxPath()+"images//");
    // String imagePath = ic.
    ActiveObj active = DC_Game.game.getManager().getActiveObj().getRef().getActive();
    CompositeAnim anim = AnimMaster.getInstance().getConstructor().getOrCreate(active);
    // ANIM_PART part = ANIM_PART.IMPACT;
    anim.getMap().keySet().forEach(part -> {
        // anim.getMap().get(part).getData().setValue();
        List<EmitterActor> list = EmitterPools.getEmitters(presetPath);
        anim.getMap().get(part).setEmitterList(list);
    });
// impact?
}
Also used : ActiveObj(main.entity.obj.ActiveObj) FileChooser(main.swing.generic.components.editors.FileChooser) EmitterActor(eidolons.libgdx.anims.particles.EmitterActor) CompositeAnim(eidolons.libgdx.anims.CompositeAnim)

Example 2 with FileChooser

use of main.swing.generic.components.editors.FileChooser in project Eidolons by IDemiurge.

the class Crawler method launchFastDc.

private static void launchFastDc() {
    DC_Engine.jarInit();
    FontMaster.init();
    GuiManager.init();
    String dungeon = new FileChooser(PathFinder.getDungeonLevelFolder()).launch("", "");
    FAST_DC.DEFAULT_DUNGEON = (dungeon);
    Ref ref = new Ref();
    Condition conditions = new Conditions();
    FAST_DC.PLAYER_PARTY = ListChooser.chooseType(DC_TYPE.CHARS, ref, conditions);
    FAST_DC.main(new String[] { String.valueOf(PresetLauncher.OPTION_NEW) });
}
Also used : Condition(main.elements.conditions.Condition) Ref(main.entity.Ref) FileChooser(main.swing.generic.components.editors.FileChooser) Conditions(main.elements.conditions.Conditions)

Example 3 with FileChooser

use of main.swing.generic.components.editors.FileChooser in project Eidolons by IDemiurge.

the class Crawler method main.

public static void main(String[] args) {
    FAST_DC.FAST_MODE = false;
    ExplorationMaster.setTestMode(true);
    DC_Engine.jarInit();
    FontMaster.init();
    GuiManager.init();
    int index = DialogMaster.optionChoice(launch_options, "Choose the type of Eidolons game you want to launch...");
    List<String> parts = null;
    if (index == 0) {
        String data = FileManager.readFile(launchDataPath);
        parts = StringMaster.openContainer(data);
        index = 1;
    }
    if (index == 2) {
    // random  = true;
    // parts = Collections.nCopies(2, "");
    } else if (index == 3) {
        FAST_DC.main(new String[] { "" + (Arrays.asList(PresetLauncher.LAUNCH_OPTIONS)).indexOf(StringMaster.getWellFormattedString(LAUNCH.EXPLORATION.toString())) });
        return;
    } else if (index == 4) {
        FAST_DC.main(new String[] { "" + (Arrays.asList(PresetLauncher.LAUNCH_OPTIONS)).indexOf(StringMaster.getWellFormattedString(LAUNCH.EXPLORATION_TEST.toString())) });
        return;
    }
    DemoLauncher.main(null);
    DC_Engine.mainMenuInit();
    String dungeon = parts == null ? "crawl" + new FileChooser(PathFinder.getDungeonLevelFolder() + "crawl").launch("", "") : parts.get(0);
    launchData += dungeon;
    dungeon = StringMaster.removePreviousPathSegments(dungeon, PathFinder.getDungeonLevelFolder());
    ScreenData data = new ScreenData(ScreenType.BATTLE, dungeon);
    GameLauncher launcher = new GameLauncher(GAME_SUBCLASS.TEST);
    Ref ref = new Ref();
    Condition conditions = new Conditions();
    launcher.PLAYER_PARTY = parts == null ? ListChooser.chooseType(DC_TYPE.CHARS, ref, conditions) : parts.get(1);
    launchData += StringMaster.SEPARATOR + launcher.PLAYER_PARTY;
    launcher.setDungeon(dungeon);
    launcher.PARTY_CODE = CODE.PRESET;
    launcher.ENEMY_CODE = CODE.NONE;
    GuiEventManager.trigger(GuiEventType.SWITCH_SCREEN, data);
    DC_Engine.gameStartInit();
    DC_Game game = launcher.initDC_Game();
    game.start(true);
    if (!StringMaster.isEmpty(launchData)) {
        FileManager.write(launchData, launchDataPath);
    }
}
Also used : Condition(main.elements.conditions.Condition) Ref(main.entity.Ref) FileChooser(main.swing.generic.components.editors.FileChooser) GameLauncher(eidolons.game.core.launch.GameLauncher) DC_Game(eidolons.game.core.game.DC_Game) Conditions(main.elements.conditions.Conditions) ScreenData(eidolons.libgdx.screens.ScreenData)

Example 4 with FileChooser

use of main.swing.generic.components.editors.FileChooser in project Eidolons by IDemiurge.

the class LE_MapMaster method loadBlock.

public void loadBlock() {
    if (blockChooser == null) {
        blockChooser = new FileChooser(PathFinder.getMapBlockFolderPath());
    }
    String filePath = blockChooser.launch(PathFinder.getMapBlockFolderPath(), "");
    if (filePath == null) {
        return;
    }
    Document node = XML_Converter.getDoc(FileManager.readFile(filePath));
    Dungeon dungeon = getLevel().getDungeon();
    LocationBuilder.constructBlock(node, getPlan().getBlocks().size(), null, getPlan(), dungeon);
}
Also used : Dungeon(eidolons.game.battlecraft.logic.dungeon.universal.Dungeon) FileChooser(main.swing.generic.components.editors.FileChooser) Document(org.w3c.dom.Document)

Example 5 with FileChooser

use of main.swing.generic.components.editors.FileChooser in project Eidolons by IDemiurge.

the class PresetMaster method newPreset.

public static void newPreset() {
    String path = new FileChooser(getPresetFolderPath()).launch("", "");
    Preset preset;
    if (path != null) {
        File file = FileManager.getFile(path);
        String data = FileManager.readFile(file);
        String name = DialogMaster.inputText("", file.getName());
        if (name.equals(file.getName())) {
            name = file.getName() + " " + TimeMaster.getFormattedDate(false);
        // Calendar.getInstance().getTime().getMonth()
        }
        preset = new Preset(name, path, data);
    } else {
        // TODO
        preset = new Preset(generateName(), generatePath());
    }
    // initParams(preset); ???
    savePreset(preset);
}
Also used : FileChooser(main.swing.generic.components.editors.FileChooser) File(java.io.File)

Aggregations

FileChooser (main.swing.generic.components.editors.FileChooser)6 Condition (main.elements.conditions.Condition)2 Conditions (main.elements.conditions.Conditions)2 Ref (main.entity.Ref)2 Dungeon (eidolons.game.battlecraft.logic.dungeon.universal.Dungeon)1 DC_Game (eidolons.game.core.game.DC_Game)1 GameLauncher (eidolons.game.core.launch.GameLauncher)1 CompositeAnim (eidolons.libgdx.anims.CompositeAnim)1 EmitterActor (eidolons.libgdx.anims.particles.EmitterActor)1 ScreenData (eidolons.libgdx.screens.ScreenData)1 File (java.io.File)1 ActiveObj (main.entity.obj.ActiveObj)1 ImageChooser (main.swing.generic.components.editors.ImageChooser)1 Document (org.w3c.dom.Document)1