26 lines
676 B
C#
26 lines
676 B
C#
using NBC;
|
|
|
|
namespace NBF.Setting
|
|
{
|
|
[Sort(1)]
|
|
public class MasterVolumeSetting : RangeOption
|
|
{
|
|
public override string Name => "MasterVolume";
|
|
public override string Group => SettingsDef.Group.Sound;
|
|
public override string Tab => SettingsDef.Tab.SoundAndLanguage;
|
|
public override int MinValue => 0;
|
|
public override int MaxValue => 100;
|
|
|
|
protected override int DefaultValue => 100;
|
|
|
|
protected override void OnInitialize()
|
|
{
|
|
// SetValue(10);
|
|
}
|
|
|
|
protected override void OnApply()
|
|
{
|
|
SoundManager.Inst.SetMasterVolume(GetValue() / 100f);
|
|
}
|
|
}
|
|
} |