Changeset - r27011:a6903514ebbd
[Not reviewed]
master
0 1 0
Peter Nelson - 18 months ago 2023-03-07 22:43:22
peter1138@openttd.org
Change: Resize jukebox when changing music set.
1 file changed with 13 insertions and 2 deletions:
0 comments (0 inline, 0 general)
src/music_gui.cpp
Show inline comments
 
@@ -178,6 +178,8 @@ void MusicSystem::ChangeMusicSet(const s
 
	this->ChangePlaylist(this->selected_playlist);
 

	
 
	InvalidateWindowData(WC_GAME_OPTIONS, WN_GAME_OPTIONS_GAME_OPTIONS, 0, true);
 
	InvalidateWindowData(WC_MUSIC_TRACK_SELECTION, 0, 1, true);
 
	InvalidateWindowData(WC_MUSIC_WINDOW, 0, 1, true);
 
}
 

	
 
/** Enable shuffle mode and restart playback */
 
@@ -480,7 +482,12 @@ struct MusicTrackSelectionWindow : publi
 
			this->SetWidgetLoweredState(WID_MTS_ALL + i, i == _settings_client.music.playlist);
 
		}
 
		this->SetWidgetDisabledState(WID_MTS_CLEAR, _settings_client.music.playlist <= 3);
 
		this->SetDirty();
 

	
 
		if (data == 1) {
 
			this->ReInit();
 
		} else {
 
			this->SetDirty();
 
		}
 
	}
 

	
 
	void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize) override
 
@@ -764,7 +771,11 @@ struct MusicWindow : public Window {
 

	
 
		UpdateDisabledButtons();
 

	
 
		this->SetDirty();
 
		if (data == 1) {
 
			this->ReInit();
 
		} else {
 
			this->SetDirty();
 
		}
 
	}
 

	
 
	void OnClick(Point pt, int widget, int click_count) override
0 comments (0 inline, 0 general)