|
@@ -145,13 +145,13 @@ static void SelectSongToPlay()
|
|
|
|
|
|
static void StopMusic()
|
|
|
{
|
|
|
_music_wnd_cursong = 0;
|
|
|
DoStopMusic();
|
|
|
_song_is_active = false;
|
|
|
InvalidateWindowWidget(WC_MUSIC_WINDOW, 0, 9);
|
|
|
SetWindowWidgetDirty(WC_MUSIC_WINDOW, 0, 9);
|
|
|
}
|
|
|
|
|
|
static void PlayPlaylistSong()
|
|
|
{
|
|
|
if (_cur_playlist[0] == 0) {
|
|
|
SelectSongToPlay();
|
|
@@ -166,13 +166,13 @@ static void PlayPlaylistSong()
|
|
|
}
|
|
|
}
|
|
|
_music_wnd_cursong = _cur_playlist[0];
|
|
|
DoPlaySong();
|
|
|
_song_is_active = true;
|
|
|
|
|
|
InvalidateWindowWidget(WC_MUSIC_WINDOW, 0, 9);
|
|
|
SetWindowWidgetDirty(WC_MUSIC_WINDOW, 0, 9);
|
|
|
}
|
|
|
|
|
|
void ResetMusic()
|
|
|
{
|
|
|
_music_wnd_cursong = 1;
|
|
|
DoPlaySong();
|
|
@@ -597,13 +597,13 @@ struct MusicWindow : public Window {
|
|
|
_left_button_clicked = false;
|
|
|
} break;
|
|
|
|
|
|
case MW_SHUFFLE: // toggle shuffle
|
|
|
msf.shuffle ^= 1;
|
|
|
this->SetWidgetLoweredState(MW_SHUFFLE, msf.shuffle);
|
|
|
this->InvalidateWidget(MW_SHUFFLE);
|
|
|
this->SetWidgetDirty(MW_SHUFFLE);
|
|
|
StopMusic();
|
|
|
SelectSongToPlay();
|
|
|
this->SetDirty();
|
|
|
break;
|
|
|
|
|
|
case MW_PROGRAMME: // show track selection
|
|
@@ -620,13 +620,13 @@ struct MusicWindow : public Window {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
#if 0
|
|
|
virtual void OnTick()
|
|
|
{
|
|
|
this->InvalidateWidget(MW_GAUGE);
|
|
|
this->SetWidgetDirty(MW_GAUGE);
|
|
|
}
|
|
|
#endif
|
|
|
};
|
|
|
|
|
|
static const NWidgetPart _nested_music_window_widgets[] = {
|
|
|
NWidget(NWID_HORIZONTAL),
|