Search in sources :

Example 1 with PLAY_MODE

use of main.music.gui.MusicMouseListener.PLAY_MODE in project Eidolons by IDemiurge.

the class MC_ControlPanel method doDialog.

public static void doDialog(boolean alt, boolean shift, boolean ctrl, MusicList list, boolean last) {
    if (!last) {
        dialogChooseOrRandom = alt || DialogMaster.confirm("Choose or random?");
    }
    if (!last) {
        dialogListTypes = new ArrayList<>(DataManager.getTypes(AT_OBJ_TYPE.MUSIC_LIST));
        dialogListTypes = filterViaDialog(dialogListTypes, ctrl, shift);
        cachedDialogListTypes = new ArrayList<>(dialogListTypes);
    }
    String result;
    if (dialogChooseOrRandom) {
        result = ListChooser.chooseType(dialogListTypes).getProperty(AT_PROPS.PATH);
    } else {
        ObjType item = new RandomWizard<ObjType>().getRandomListItem(dialogListTypes);
        dialogListTypes.remove(item);
        if (dialogListTypes.isEmpty()) {
            dialogListTypes = new ArrayList<>(cachedDialogListTypes);
        }
        result = item.getProperty(AT_PROPS.PATH);
    }
    // String listPath = DataManager.getType(result, AT_OBJ_TYPE.MUSIC_LIST
    // )
    // .getProperty(AT_PROPS.PATH);
    PLAY_MODE playMode = MusicMouseListener.getPlayMode();
    if (ctrl) {
        playMode = new EnumMaster<PLAY_MODE>().retrieveEnumConst(PLAY_MODE.class, ListChooser.chooseEnum(PLAY_MODE.class));
    }
    MusicMouseListener.playM3uList(result, playMode);
}
Also used : PLAY_MODE(main.music.gui.MusicMouseListener.PLAY_MODE) ObjType(main.entity.type.ObjType)

Aggregations

ObjType (main.entity.type.ObjType)1 PLAY_MODE (main.music.gui.MusicMouseListener.PLAY_MODE)1