use of eidolons.system.audio.MusicMaster.MUSIC_VARIANT in project Eidolons by IDemiurge.
the class OptionsMaster method applySoundOptions_.
private static void applySoundOptions_(SoundOptions soundOptions) {
for (Object sub : soundOptions.getValues().keySet()) {
new EnumMaster<SOUND_OPTION>().retrieveEnumConst(SOUND_OPTION.class, soundOptions.getValues().get(sub).toString());
SOUND_OPTION key = soundOptions.getKey((sub.toString()));
String value = soundOptions.getValue(key);
if (!StringMaster.isInteger(value)) {
switch(key) {
case SOUNDS_OFF:
SoundMaster.setOn(false);
// MusicMaster.resetSwitcher();
break;
case MUSIC_OFF:
MusicMaster.resetSwitcher();
break;
case MUSIC_VARIANT:
MusicMaster.getInstance().setVariant(new EnumMaster<MUSIC_VARIANT>().retrieveEnumConst(MUSIC_VARIANT.class, soundOptions.getValue(key)));
break;
}
} else {
Integer integer = Integer.valueOf(value.toLowerCase());
Float v = new Float(integer) / 100;
switch(key) {
case MASTER_VOLUME:
SoundMaster.setMasterVolume(integer);
MusicMaster.resetVolume();
break;
case MUSIC_VOLUME:
MusicMaster.resetVolume();
// auto
break;
}
}
}
}
Aggregations