Codechange: Rename slider widget functions to be less specific.
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user