mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 07:42:57 +08:00
Add ability to pad stage vertically
This commit is contained in:
parent
4cb07b8839
commit
a543222a2b
@ -60,6 +60,10 @@ namespace osu.Game.Rulesets.Mania.Skinning.Argon
|
|||||||
|
|
||||||
switch (maniaLookup.Lookup)
|
switch (maniaLookup.Lookup)
|
||||||
{
|
{
|
||||||
|
case LegacyManiaSkinConfigurationLookups.StagePaddingBottom:
|
||||||
|
case LegacyManiaSkinConfigurationLookups.StagePaddingTop:
|
||||||
|
return SkinUtils.As<TValue>(new Bindable<float>(30));
|
||||||
|
|
||||||
case LegacyManiaSkinConfigurationLookups.ColumnWidth:
|
case LegacyManiaSkinConfigurationLookups.ColumnWidth:
|
||||||
return SkinUtils.As<TValue>(new Bindable<float>(
|
return SkinUtils.As<TValue>(new Bindable<float>(
|
||||||
stage.IsSpecialColumn(column) ? 80 : 60
|
stage.IsSpecialColumn(column) ? 80 : 60
|
||||||
|
@ -36,6 +36,8 @@ namespace osu.Game.Rulesets.Mania.UI
|
|||||||
|
|
||||||
AutoSizeAxes = Axes.X;
|
AutoSizeAxes = Axes.X;
|
||||||
|
|
||||||
|
Masking = true;
|
||||||
|
|
||||||
InternalChild = columns = new FillFlowContainer<Container>
|
InternalChild = columns = new FillFlowContainer<Container>
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Y,
|
RelativeSizeAxes = Axes.Y,
|
||||||
|
@ -13,6 +13,7 @@ using osu.Game.Rulesets.Judgements;
|
|||||||
using osu.Game.Rulesets.Mania.Beatmaps;
|
using osu.Game.Rulesets.Mania.Beatmaps;
|
||||||
using osu.Game.Rulesets.Mania.Objects;
|
using osu.Game.Rulesets.Mania.Objects;
|
||||||
using osu.Game.Rulesets.Mania.Objects.Drawables;
|
using osu.Game.Rulesets.Mania.Objects.Drawables;
|
||||||
|
using osu.Game.Rulesets.Mania.Skinning;
|
||||||
using osu.Game.Rulesets.Mania.UI.Components;
|
using osu.Game.Rulesets.Mania.UI.Components;
|
||||||
using osu.Game.Rulesets.Objects;
|
using osu.Game.Rulesets.Objects;
|
||||||
using osu.Game.Rulesets.Objects.Drawables;
|
using osu.Game.Rulesets.Objects.Drawables;
|
||||||
@ -130,6 +131,37 @@ namespace osu.Game.Rulesets.Mania.UI
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private ISkinSource currentSkin;
|
||||||
|
|
||||||
|
[BackgroundDependencyLoader]
|
||||||
|
private void load(ISkinSource skin)
|
||||||
|
{
|
||||||
|
currentSkin = skin;
|
||||||
|
|
||||||
|
skin.SourceChanged += onSkinChanged;
|
||||||
|
onSkinChanged();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void onSkinChanged()
|
||||||
|
{
|
||||||
|
float paddingTop = currentSkin.GetConfig<ManiaSkinConfigurationLookup, float>(new ManiaSkinConfigurationLookup(LegacyManiaSkinConfigurationLookups.StagePaddingTop))?.Value ?? 0;
|
||||||
|
float paddingBottom = currentSkin.GetConfig<ManiaSkinConfigurationLookup, float>(new ManiaSkinConfigurationLookup(LegacyManiaSkinConfigurationLookups.StagePaddingBottom))?.Value ?? 0;
|
||||||
|
|
||||||
|
Padding = new MarginPadding
|
||||||
|
{
|
||||||
|
Top = paddingTop,
|
||||||
|
Bottom = paddingBottom,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void Dispose(bool isDisposing)
|
||||||
|
{
|
||||||
|
base.Dispose(isDisposing);
|
||||||
|
|
||||||
|
if (currentSkin != null)
|
||||||
|
currentSkin.SourceChanged -= onSkinChanged;
|
||||||
|
}
|
||||||
|
|
||||||
protected override void LoadComplete()
|
protected override void LoadComplete()
|
||||||
{
|
{
|
||||||
base.LoadComplete();
|
base.LoadComplete();
|
||||||
|
@ -42,6 +42,8 @@ namespace osu.Game.Skinning
|
|||||||
HitPosition,
|
HitPosition,
|
||||||
ScorePosition,
|
ScorePosition,
|
||||||
LightPosition,
|
LightPosition,
|
||||||
|
StagePaddingTop,
|
||||||
|
StagePaddingBottom,
|
||||||
HitTargetImage,
|
HitTargetImage,
|
||||||
ShowJudgementLine,
|
ShowJudgementLine,
|
||||||
KeyImage,
|
KeyImage,
|
||||||
|
Loading…
Reference in New Issue
Block a user