Merge pull request #5628 from pavlos256/smooth-scrolling
Add smooth scrolling to the ScrollPanelWidget
This commit is contained in:
@@ -161,7 +161,7 @@ namespace OpenRA.Mods.RA.Widgets.Logic
|
||||
var scrolledToBottom = chatScrollPanel.ScrolledToBottom;
|
||||
chatScrollPanel.AddChild(template);
|
||||
if (scrolledToBottom)
|
||||
chatScrollPanel.ScrollToBottom();
|
||||
chatScrollPanel.ScrollToBottom(smooth: true);
|
||||
|
||||
Sound.PlayNotification(modRules, null, "Sounds", "ChatLine", null);
|
||||
}
|
||||
|
||||
@@ -568,7 +568,7 @@ namespace OpenRA.Mods.RA.Widgets.Logic
|
||||
var scrolledToBottom = chatPanel.ScrolledToBottom;
|
||||
chatPanel.AddChild(template);
|
||||
if (scrolledToBottom)
|
||||
chatPanel.ScrollToBottom();
|
||||
chatPanel.ScrollToBottom(smooth: true);
|
||||
|
||||
Sound.PlayNotification(modRules, null, "Sounds", "ChatLine", null);
|
||||
}
|
||||
|
||||
@@ -76,7 +76,7 @@ namespace OpenRA.Mods.RA.Widgets.Logic
|
||||
{
|
||||
var uid = visibleMaps.Random(Game.CosmeticRandom);
|
||||
selectedUid = uid;
|
||||
scrollpanel.ScrollToItem(uid);
|
||||
scrollpanel.ScrollToItem(uid, smooth: true);
|
||||
};
|
||||
randomMapButton.IsDisabled = () => visibleMaps == null || visibleMaps.Count == 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user