getGainParameter method
ParameterMenuParameter
getGainParameter({
- required String title,
- required SoundChannel soundChannel,
Get a valid parameter for the given soundChannel
and title
.
Implementation
ParameterMenuParameter getGainParameter({
required final String title,
required final SoundChannel soundChannel,
}) =>
ParameterMenuParameter(
getLabel: () {
final gain = soundChannel.gain.toStringAsFixed(1);
return Message(
gain: world.soundOptions.defaultGain,
keepAlive: true,
sound: world.menuMoveSound,
text: '$title $gain',
);
},
increaseValue: () => changeSoundChannelGain(
soundChannel: soundChannel,
value: world.soundMenuOptions.gainAdjust,
),
decreaseValue: () => changeSoundChannelGain(
soundChannel: soundChannel,
value: -world.soundMenuOptions.gainAdjust,
),
);