mirror of
https://github.com/osukey/osukey.git
synced 2025-05-19 12:37:38 +09:00
Fix MedalIcon usage
This commit is contained in:
parent
3fc2afeb26
commit
5dbc32f49b
@ -19,8 +19,8 @@ namespace osu.Game.Overlays.Profile.Sections
|
|||||||
private const int fade_duration = 200;
|
private const int fade_duration = 200;
|
||||||
|
|
||||||
private Box underscoreLine;
|
private Box underscoreLine;
|
||||||
private readonly Box coloredBackground;
|
private Box coloredBackground;
|
||||||
private readonly Container background;
|
private Container background;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// A visual element displayed to the left of <see cref="LeftFlowContainer"/> content.
|
/// A visual element displayed to the left of <see cref="LeftFlowContainer"/> content.
|
||||||
@ -36,6 +36,19 @@ namespace osu.Game.Overlays.Profile.Sections
|
|||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.X;
|
RelativeSizeAxes = Axes.X;
|
||||||
Height = 60;
|
Height = 60;
|
||||||
|
|
||||||
|
Content = new Container
|
||||||
|
{
|
||||||
|
RelativeSizeAxes = Axes.Both,
|
||||||
|
Anchor = Anchor.TopCentre,
|
||||||
|
Origin = Anchor.TopCentre,
|
||||||
|
Width = 0.97f,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
[BackgroundDependencyLoader(true)]
|
||||||
|
private void load(OsuColour colour)
|
||||||
|
{
|
||||||
InternalChildren = new Drawable[]
|
InternalChildren = new Drawable[]
|
||||||
{
|
{
|
||||||
background = new Container
|
background = new Container
|
||||||
@ -53,21 +66,7 @@ namespace osu.Game.Overlays.Profile.Sections
|
|||||||
},
|
},
|
||||||
Child = coloredBackground = new Box { RelativeSizeAxes = Axes.Both }
|
Child = coloredBackground = new Box { RelativeSizeAxes = Axes.Both }
|
||||||
},
|
},
|
||||||
Content = new Container
|
Content,
|
||||||
{
|
|
||||||
RelativeSizeAxes = Axes.Both,
|
|
||||||
Anchor = Anchor.TopCentre,
|
|
||||||
Origin = Anchor.TopCentre,
|
|
||||||
Width = 0.97f,
|
|
||||||
},
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
[BackgroundDependencyLoader(true)]
|
|
||||||
private void load(OsuColour colour)
|
|
||||||
{
|
|
||||||
AddRange(new Drawable[]
|
|
||||||
{
|
|
||||||
underscoreLine = new Box
|
underscoreLine = new Box
|
||||||
{
|
{
|
||||||
Anchor = Anchor.BottomCentre,
|
Anchor = Anchor.BottomCentre,
|
||||||
@ -101,7 +100,7 @@ namespace osu.Game.Overlays.Profile.Sections
|
|||||||
Origin = Anchor.CentreRight,
|
Origin = Anchor.CentreRight,
|
||||||
Direction = FillDirection.Vertical,
|
Direction = FillDirection.Vertical,
|
||||||
},
|
},
|
||||||
});
|
};
|
||||||
|
|
||||||
coloredBackground.Colour = underscoreLine.Colour = colour.Gray4;
|
coloredBackground.Colour = underscoreLine.Colour = colour.Gray4;
|
||||||
}
|
}
|
||||||
|
@ -66,11 +66,14 @@ namespace osu.Game.Overlays.Profile.Sections.Recent
|
|||||||
};
|
};
|
||||||
|
|
||||||
case RecentActivityType.Achievement:
|
case RecentActivityType.Achievement:
|
||||||
return new MedalIcon(activity.Achievement.Slug)
|
return new DelayedLoadWrapper(new MedalIcon(activity.Achievement.Slug)
|
||||||
|
{
|
||||||
|
RelativeSizeAxes = Axes.Both,
|
||||||
|
FillMode = FillMode.Fit,
|
||||||
|
})
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Y,
|
RelativeSizeAxes = Axes.Y,
|
||||||
Width = 60,
|
Width = 60,
|
||||||
FillMode = FillMode.Fit,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user