00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 package com.realtime.crossfire.jxclient.sound;
00023
00024 import com.realtime.crossfire.jxclient.settings.options.CheckBoxOption;
00025 import org.jetbrains.annotations.NotNull;
00026
00031 public class SoundCheckBoxOption extends CheckBoxOption {
00032
00036 @NotNull
00037 private final SoundManager soundManager;
00038
00043 public SoundCheckBoxOption(@NotNull final SoundManager soundManager) {
00044 super("<html>Plays sound effects and background music if checked.");
00045 this.soundManager = soundManager;
00046 }
00047
00051 @Override
00052 protected void execute(final boolean checked) {
00053 soundManager.setEnabled(checked);
00054 }
00055
00059 @Override
00060 public boolean isDefaultChecked() {
00061 return true;
00062 }
00063
00064 }