Add logging

This commit is contained in:
Dean Herbert
2020-10-13 13:11:47 +09:00
parent 9814e9ba7f
commit b92c22ad42
2 changed files with 7 additions and 0 deletions

View File

@ -18,6 +18,7 @@ using osu.Framework.Threading;
using osu.Framework.Graphics.Pooling; using osu.Framework.Graphics.Pooling;
using osu.Framework.Input.Bindings; using osu.Framework.Input.Bindings;
using osu.Framework.Input.Events; using osu.Framework.Input.Events;
using osu.Framework.Logging;
using osu.Game.Beatmaps; using osu.Game.Beatmaps;
using osu.Game.Extensions; using osu.Game.Extensions;
using osu.Game.Graphics.Containers; using osu.Game.Graphics.Containers;
@ -582,6 +583,8 @@ namespace osu.Game.Screens.Select
if (revalidateItems || firstIndex != displayedRange.first || lastIndex != displayedRange.last) if (revalidateItems || firstIndex != displayedRange.first || lastIndex != displayedRange.last)
{ {
Logger.Log("revalidation requested");
// Remove all items that should no longer be on-screen // Remove all items that should no longer be on-screen
scrollableContent.RemoveAll(p => p.Y + p.Item.TotalHeight < visibleUpperBound || p.Y > visibleBottomBound); scrollableContent.RemoveAll(p => p.Y + p.Item.TotalHeight < visibleUpperBound || p.Y > visibleBottomBound);
@ -596,6 +599,7 @@ namespace osu.Game.Screens.Select
if (panel == null) if (panel == null)
{ {
Logger.Log($"getting panel for {item} from pool");
panel = setPool.Get(p => p.Item = item); panel = setPool.Get(p => p.Item = item);
panel.Y = yPositions[i]; panel.Y = yPositions[i];
panel.Depth = i; panel.Depth = i;

View File

@ -11,6 +11,7 @@ using osu.Framework.Graphics.Cursor;
using osu.Framework.Graphics.Primitives; using osu.Framework.Graphics.Primitives;
using osu.Framework.Graphics.UserInterface; using osu.Framework.Graphics.UserInterface;
using osu.Framework.Localisation; using osu.Framework.Localisation;
using osu.Framework.Logging;
using osu.Game.Beatmaps; using osu.Game.Beatmaps;
using osu.Game.Beatmaps.Drawables; using osu.Game.Beatmaps.Drawables;
using osu.Game.Collections; using osu.Game.Collections;
@ -86,10 +87,12 @@ namespace osu.Game.Screens.Select.Carousel
if (Item == null) if (Item == null)
return; return;
Logger.Log($"updating item {beatmapSet}");
Content.Children = new Drawable[] Content.Children = new Drawable[]
{ {
new DelayedLoadUnloadWrapper(() => new DelayedLoadUnloadWrapper(() =>
{ {
Logger.Log($"loaded background item {beatmapSet}");
var background = new PanelBackground(manager.GetWorkingBeatmap(beatmapSet.Beatmaps.FirstOrDefault())) var background = new PanelBackground(manager.GetWorkingBeatmap(beatmapSet.Beatmaps.FirstOrDefault()))
{ {
RelativeSizeAxes = Axes.Both, RelativeSizeAxes = Axes.Both,