[Mobile] update volume selection

This commit is contained in:
Anthony Calosa
2021-02-05 18:51:45 +08:00
parent af00e56242
commit 041af9b738

View File

@@ -438,16 +438,15 @@ public class SettingsPage extends TabPage<SettingsScreen> {
localizer.getMessage("nlVibrateAfterLongPress")), localizer.getMessage("nlVibrateAfterLongPress")),
6); 6);
//Sound Options //Sound Options
if(GuiBase.getInterface().isLibgdxPort()) {
lstSettings.addItem(new CustomSelectSetting(FPref.UI_VOL_SOUNDS, lstSettings.addItem(new CustomSelectSetting(FPref.UI_VOL_SOUNDS,
localizer.getMessage("cbAdjustSoundsVolume"), localizer.getMessage("cbAdjustSoundsVolume"),
localizer.getMessage("nlAdjustSoundsVolume"), localizer.getMessage("nlAdjustSoundsVolume"),
new String[]{"0", "25", "50", "75", "100"}), new String[]{"0", "10", "20", "30", "40", "50", "60", "70", "80", "90", "100"}),
7); 7);
lstSettings.addItem(new CustomSelectSetting(FPref.UI_VOL_MUSIC, lstSettings.addItem(new CustomSelectSetting(FPref.UI_VOL_MUSIC,
localizer.getMessage("cbAdjustMusicVolume"), localizer.getMessage("cbAdjustMusicVolume"),
localizer.getMessage("nlAdjustMusicVolume"), localizer.getMessage("nlAdjustMusicVolume"),
new String[]{"0", "25", "50", "75", "100"}) { new String[]{"0", "10", "20", "30", "40", "50", "60", "70", "80", "90", "100"}) {
@Override @Override
public void valueChanged(String newValue) { public void valueChanged(String newValue) {
super.valueChanged(newValue); super.valueChanged(newValue);
@@ -455,22 +454,6 @@ public class SettingsPage extends TabPage<SettingsScreen> {
SoundSystem.instance.changeBackgroundTrack(); SoundSystem.instance.changeBackgroundTrack();
} }
}, 7); }, 7);
} else {
lstSettings.addItem(new BooleanSetting(FPref.UI_ENABLE_SOUNDS,
localizer.getMessage("cbEnableSounds"),
localizer.getMessage("nlEnableSounds")),
7);
lstSettings.addItem(new BooleanSetting(FPref.UI_ENABLE_MUSIC,
localizer.getMessage("cbEnableMusic"),
localizer.getMessage("nlEnableMusic")) {
@Override
public void select() {
super.select();
//update background music when this setting changes
SoundSystem.instance.changeBackgroundTrack();
}
},7);
}
/*lstSettings.addItem(new BooleanSetting(FPref.UI_ALT_SOUND_SYSTEM, /*lstSettings.addItem(new BooleanSetting(FPref.UI_ALT_SOUND_SYSTEM,
"Use Alternate Sound System", "Use Alternate Sound System",
"Use the alternate sound system (only use if you have issues with sound not playing or disappearing)."), "Use the alternate sound system (only use if you have issues with sound not playing or disappearing)."),