mirror of
https://github.com/osukey/osukey.git
synced 2025-07-02 08:49:59 +09:00
Further refactoring. I think this may have polluted the FooterButton too much. Not sure what to do about the centering.
This commit is contained in:
@ -56,7 +56,8 @@ namespace osu.Game.Screens.Select
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected FillFlowContainer TextContainer;
|
protected FillFlowContainer ButtonContentContainer;
|
||||||
|
protected readonly Container TextContainer;
|
||||||
protected readonly SpriteText SpriteText;
|
protected readonly SpriteText SpriteText;
|
||||||
private readonly Box box;
|
private readonly Box box;
|
||||||
private readonly Box light;
|
private readonly Box light;
|
||||||
@ -80,24 +81,35 @@ namespace osu.Game.Screens.Select
|
|||||||
EdgeSmoothness = new Vector2(2, 0),
|
EdgeSmoothness = new Vector2(2, 0),
|
||||||
RelativeSizeAxes = Axes.X,
|
RelativeSizeAxes = Axes.X,
|
||||||
},
|
},
|
||||||
TextContainer = new FillFlowContainer
|
new Container
|
||||||
|
{
|
||||||
|
AutoSizeAxes = Axes.Both,
|
||||||
|
Children = new Drawable[]
|
||||||
|
{
|
||||||
|
ButtonContentContainer = new FillFlowContainer
|
||||||
{
|
{
|
||||||
Anchor = Anchor.CentreLeft,
|
Anchor = Anchor.CentreLeft,
|
||||||
Origin = Anchor.CentreLeft,
|
Origin = Anchor.CentreLeft,
|
||||||
Direction = FillDirection.Horizontal,
|
Direction = FillDirection.Horizontal,
|
||||||
Shear = -SHEAR,
|
Shear = -SHEAR,
|
||||||
|
AutoSizeAxes = Axes.Both,
|
||||||
|
Margin = new MarginPadding { Horizontal = SHEAR_WIDTH / 4 },
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
SpriteText = new OsuSpriteText
|
TextContainer = new Container
|
||||||
{
|
{
|
||||||
|
Anchor = Anchor.Centre,
|
||||||
|
Origin = Anchor.Centre,
|
||||||
Size = new Vector2(100 - SHEAR_WIDTH, 50),
|
Size = new Vector2(100 - SHEAR_WIDTH, 50),
|
||||||
Shear = SHEAR,
|
Child = SpriteText = new OsuSpriteText
|
||||||
|
{
|
||||||
Anchor = Anchor.Centre,
|
Anchor = Anchor.Centre,
|
||||||
Origin = Anchor.Centre,
|
Origin = Anchor.Centre,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
AutoSizeAxes = Axes.Both,
|
},
|
||||||
// Margin = new MarginPadding { Left = 70, Right = 14 }
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -34,19 +34,19 @@ namespace osu.Game.Screens.Select
|
|||||||
|
|
||||||
public FooterButtonMods()
|
public FooterButtonMods()
|
||||||
{
|
{
|
||||||
TextContainer.Add(modDisplay = new FooterModDisplay
|
ButtonContentContainer.Add(modDisplay = new FooterModDisplay
|
||||||
{
|
{
|
||||||
Anchor = Anchor.Centre,
|
Anchor = Anchor.Centre,
|
||||||
Origin = Anchor.Centre,
|
Origin = Anchor.Centre,
|
||||||
DisplayUnrankedText = false,
|
DisplayUnrankedText = false,
|
||||||
Scale = new Vector2(0.8f)
|
Scale = new Vector2(0.8f)
|
||||||
});
|
});
|
||||||
TextContainer.Add(MultiplierText = new OsuSpriteText
|
ButtonContentContainer.Add(MultiplierText = new OsuSpriteText
|
||||||
{
|
{
|
||||||
Anchor = Anchor.Centre,
|
Anchor = Anchor.Centre,
|
||||||
Origin = Anchor.Centre,
|
Origin = Anchor.Centre,
|
||||||
Font = OsuFont.GetFont(weight: FontWeight.Bold),
|
Font = OsuFont.GetFont(weight: FontWeight.Bold),
|
||||||
// Margin = new MarginPadding { Right = 6 }
|
Margin = new MarginPadding { Right = 10 }
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user