Codechange: Rename slider widget functions to be less specific.

This commit is contained in:
Peter Nelson
2022-09-11 21:21:59 +01:00
committed by PeterN
parent 23a8222200
commit d35f1d3d06
4 changed files with 20 additions and 20 deletions

View File

@@ -347,11 +347,11 @@ struct GameOptionsWindow : Window {
break;
case WID_GO_BASE_SFX_VOLUME:
DrawVolumeSliderWidget(r, _settings_client.music.effect_vol);
DrawSliderWidget(r, _settings_client.music.effect_vol);
break;
case WID_GO_BASE_MUSIC_VOLUME:
DrawVolumeSliderWidget(r, _settings_client.music.music_vol);
DrawSliderWidget(r, _settings_client.music.music_vol);
break;
}
}
@@ -478,7 +478,7 @@ struct GameOptionsWindow : Window {
case WID_GO_BASE_SFX_VOLUME:
case WID_GO_BASE_MUSIC_VOLUME: {
byte &vol = (widget == WID_GO_BASE_MUSIC_VOLUME) ? _settings_client.music.music_vol : _settings_client.music.effect_vol;
if (ClickVolumeSliderWidget(this->GetWidget<NWidgetBase>(widget)->GetCurrentRect(), pt, vol)) {
if (ClickSliderWidget(this->GetWidget<NWidgetBase>(widget)->GetCurrentRect(), pt, vol)) {
if (widget == WID_GO_BASE_MUSIC_VOLUME) MusicDriver::GetInstance()->SetVolume(vol);
this->SetWidgetDirty(widget);
SetWindowClassesDirty(WC_MUSIC_WINDOW);