Only render the previews we can actually see.

This really should be fixed generally in ScrollPanelWidget,
but this is the most painful case.
This commit is contained in:
Paul Chote
2013-04-06 03:12:02 +13:00
parent 995b4c73d9
commit d739b747de

View File

@@ -107,6 +107,7 @@ namespace OpenRA.Mods.RA.Widgets.Logic
previewWidget.IgnoreMouseOver = true;
previewWidget.IgnoreMouseInput = true;
previewWidget.Map = () => m;
previewWidget.IsVisible = () => previewWidget.RenderBounds.IntersectsWith(scrollpanel.RenderBounds);
var previewLoadingWidget = item.GetOrNull<BackgroundWidget>("PREVIEW_PLACEHOLDER");
if (previewLoadingWidget != null)