mirror of
https://github.com/ppy/osu.git
synced 2024-11-06 06:57:39 +08:00
Add ability to override width of value area
This commit is contained in:
parent
2a12194ff9
commit
7faeed88b0
@ -20,7 +20,6 @@ namespace osu.Game.Overlays.Mods
|
||||
public abstract class ModsEffectDisplay : Container
|
||||
{
|
||||
public const float HEIGHT = 42;
|
||||
private const float value_area_width = 56;
|
||||
private const float transition_duration = 200;
|
||||
|
||||
private readonly Box contentBackground;
|
||||
@ -38,6 +37,8 @@ namespace osu.Game.Overlays.Mods
|
||||
/// </summary>
|
||||
protected abstract LocalisableString Label { get; }
|
||||
|
||||
protected virtual float ValueAreaWidth => 56;
|
||||
|
||||
protected override Container<Drawable> Content => content;
|
||||
|
||||
protected ModsEffectDisplay()
|
||||
@ -59,7 +60,7 @@ namespace osu.Game.Overlays.Mods
|
||||
Anchor = Anchor.CentreRight,
|
||||
Origin = Anchor.CentreRight,
|
||||
RelativeSizeAxes = Axes.Y,
|
||||
Width = value_area_width + ModSelectPanel.CORNER_RADIUS
|
||||
Width = ValueAreaWidth + ModSelectPanel.CORNER_RADIUS
|
||||
},
|
||||
new GridContainer
|
||||
{
|
||||
@ -68,7 +69,7 @@ namespace osu.Game.Overlays.Mods
|
||||
ColumnDimensions = new[]
|
||||
{
|
||||
new Dimension(GridSizeMode.AutoSize),
|
||||
new Dimension(GridSizeMode.Absolute, value_area_width)
|
||||
new Dimension(GridSizeMode.Absolute, ValueAreaWidth)
|
||||
},
|
||||
Content = new[]
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user