scroll maplist to the top when changing filter
This commit is contained in:
@@ -125,6 +125,11 @@ namespace OpenRA.Widgets
|
||||
ListOffset = Math.Min(0,Bounds.Height - ContentHeight);
|
||||
}
|
||||
|
||||
public void ScrollToTop()
|
||||
{
|
||||
ListOffset = 0;
|
||||
}
|
||||
|
||||
public override void Tick ()
|
||||
{
|
||||
if (UpPressed) Scroll(1);
|
||||
|
||||
@@ -80,6 +80,7 @@ namespace OpenRA.Mods.RA.Widgets.Logic
|
||||
void EnumerateMaps()
|
||||
{
|
||||
scrollpanel.RemoveChildren();
|
||||
(scrollpanel as ScrollPanelWidget).ScrollToTop();
|
||||
|
||||
var maps = Game.modData.AvailableMaps
|
||||
.Where(kv => kv.Value.Selectable)
|
||||
|
||||
Reference in New Issue
Block a user