Make icons container private

This commit is contained in:
Joehu 2020-04-05 14:53:49 -07:00
parent 88cc552534
commit 0f11ecce01
1 changed files with 8 additions and 8 deletions

View File

@ -41,7 +41,7 @@ public Bindable<IReadOnlyList<Mod>> Current
}
}
protected readonly FillFlowContainer<ModIcon> IconsContainer;
private readonly FillFlowContainer<ModIcon> iconsContainer;
private readonly OsuSpriteText unrankedText;
public ModDisplay()
@ -50,7 +50,7 @@ public ModDisplay()
Children = new Drawable[]
{
IconsContainer = new ReverseChildIDFillFlowContainer<ModIcon>
iconsContainer = new ReverseChildIDFillFlowContainer<ModIcon>
{
Anchor = Anchor.TopCentre,
Origin = Anchor.TopCentre,
@ -68,11 +68,11 @@ public ModDisplay()
Current.ValueChanged += mods =>
{
IconsContainer.Clear();
iconsContainer.Clear();
foreach (Mod mod in mods.NewValue)
{
IconsContainer.Add(new ModIcon(mod) { Scale = new Vector2(0.6f) });
iconsContainer.Add(new ModIcon(mod) { Scale = new Vector2(0.6f) });
}
if (IsLoaded)
@ -91,7 +91,7 @@ protected override void LoadComplete()
base.LoadComplete();
appearTransform();
IconsContainer.FadeInFromZero(fade_duration, Easing.OutQuint);
iconsContainer.FadeInFromZero(fade_duration, Easing.OutQuint);
}
private void appearTransform()
@ -103,20 +103,20 @@ private void appearTransform()
expand();
using (IconsContainer.BeginDelayedSequence(1200))
using (iconsContainer.BeginDelayedSequence(1200))
contract();
}
private void expand()
{
if (ExpansionMode != ExpansionMode.AlwaysContracted)
IconsContainer.TransformSpacingTo(new Vector2(5, 0), 500, Easing.OutQuint);
iconsContainer.TransformSpacingTo(new Vector2(5, 0), 500, Easing.OutQuint);
}
private void contract()
{
if (ExpansionMode != ExpansionMode.AlwaysExpanded)
IconsContainer.TransformSpacingTo(new Vector2(-25, 0), 500, Easing.OutQuint);
iconsContainer.TransformSpacingTo(new Vector2(-25, 0), 500, Easing.OutQuint);
}
protected override bool OnHover(HoverEvent e)