mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 04:52: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)
|
||||
{
|
||||
case LegacyManiaSkinConfigurationLookups.StagePaddingBottom:
|
||||
case LegacyManiaSkinConfigurationLookups.StagePaddingTop:
|
||||
return SkinUtils.As<TValue>(new Bindable<float>(30));
|
||||
|
||||
case LegacyManiaSkinConfigurationLookups.ColumnWidth:
|
||||
return SkinUtils.As<TValue>(new Bindable<float>(
|
||||
stage.IsSpecialColumn(column) ? 80 : 60
|
||||
|
@ -36,6 +36,8 @@ namespace osu.Game.Rulesets.Mania.UI
|
||||
|
||||
AutoSizeAxes = Axes.X;
|
||||
|
||||
Masking = true;
|
||||
|
||||
InternalChild = columns = new FillFlowContainer<Container>
|
||||
{
|
||||
RelativeSizeAxes = Axes.Y,
|
||||
|
@ -13,6 +13,7 @@ using osu.Game.Rulesets.Judgements;
|
||||
using osu.Game.Rulesets.Mania.Beatmaps;
|
||||
using osu.Game.Rulesets.Mania.Objects;
|
||||
using osu.Game.Rulesets.Mania.Objects.Drawables;
|
||||
using osu.Game.Rulesets.Mania.Skinning;
|
||||
using osu.Game.Rulesets.Mania.UI.Components;
|
||||
using osu.Game.Rulesets.Objects;
|
||||
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()
|
||||
{
|
||||
base.LoadComplete();
|
||||
|
@ -42,6 +42,8 @@ namespace osu.Game.Skinning
|
||||
HitPosition,
|
||||
ScorePosition,
|
||||
LightPosition,
|
||||
StagePaddingTop,
|
||||
StagePaddingBottom,
|
||||
HitTargetImage,
|
||||
ShowJudgementLine,
|
||||
KeyImage,
|
||||
|
Loading…
Reference in New Issue
Block a user