Add tooltips to overflowing labels
This commit is contained in:
committed by
abcdefg30
parent
1fee50be2e
commit
fde215360c
@@ -135,7 +135,9 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
foreach (var song in music)
|
||||
{
|
||||
var item = ScrollItemWidget.Setup(song.Filename, itemTemplate, () => currentSong == song, () => { currentSong = song; Play(); }, () => { });
|
||||
item.Get<LabelWidget>("TITLE").GetText = () => song.Title;
|
||||
var label = item.Get<LabelWithTooltipWidget>("TITLE");
|
||||
WidgetUtils.TruncateLabelToTooltip(label, song.Title);
|
||||
|
||||
item.Get<LabelWidget>("LENGTH").GetText = () => SongLengthLabel(song);
|
||||
musicList.AddChild(item);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user