Add smooth scrolling to the ScrollPanelWidget

This commit is contained in:
Pavlos Touboulidis
2014-06-13 12:18:09 +03:00
parent 53930fdc81
commit 628c524494
4 changed files with 95 additions and 39 deletions

View File

@@ -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;
}