mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 12:17:26 +08:00
Use AddInternal instead of AddTopLevel.
This commit is contained in:
parent
99c8f618af
commit
d9486e790a
@ -41,7 +41,7 @@ namespace osu.Game.GameModes
|
||||
}
|
||||
else if (bg != null)
|
||||
{
|
||||
AddTopLevel(new ParallaxContainer
|
||||
AddInternal(new ParallaxContainer
|
||||
{
|
||||
Depth = float.MinValue,
|
||||
Children = new[]
|
||||
@ -51,7 +51,6 @@ namespace osu.Game.GameModes
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
base.OnEntering(last);
|
||||
}
|
||||
|
||||
|
@ -14,21 +14,21 @@ namespace osu.Game.Graphics.Containers
|
||||
public ParallaxContainer()
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both;
|
||||
AddInternal(content = new Container()
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
Anchor = Anchor.Centre,
|
||||
Origin = Anchor.Centre
|
||||
});
|
||||
}
|
||||
|
||||
private Container content = new Container()
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
Anchor = Anchor.Centre,
|
||||
Origin = Anchor.Centre
|
||||
};
|
||||
private Container content;
|
||||
|
||||
protected override Container AddTarget => content;
|
||||
protected override Container Content => content;
|
||||
|
||||
public override void Load()
|
||||
{
|
||||
base.Load();
|
||||
Add(content);
|
||||
}
|
||||
|
||||
protected override bool OnMouseMove(InputState state)
|
||||
|
@ -22,18 +22,19 @@ namespace osu.Game.Graphics.UserInterface
|
||||
set
|
||||
{
|
||||
foreach (var k in value)
|
||||
AddKey(k);
|
||||
addKey(k);
|
||||
|
||||
Children = value;
|
||||
}
|
||||
}
|
||||
|
||||
public void AddKey(KeyCounter key)
|
||||
private void addKey(KeyCounter key)
|
||||
{
|
||||
counters.Add(key);
|
||||
key.IsCounting = this.IsCounting;
|
||||
key.FadeTime = this.FadeTime;
|
||||
key.KeyDownTextColor = this.KeyDownTextColor;
|
||||
key.KeyUpTextColor = this.KeyUpTextColor;
|
||||
base.Add(key);
|
||||
key.IsCounting = IsCounting;
|
||||
key.FadeTime = FadeTime;
|
||||
key.KeyDownTextColor = KeyDownTextColor;
|
||||
key.KeyUpTextColor = KeyUpTextColor;
|
||||
}
|
||||
|
||||
public void ResetCount()
|
||||
|
@ -21,7 +21,7 @@ namespace osu.Game
|
||||
public Options Options;
|
||||
public APIAccess API;
|
||||
|
||||
protected override Container AddTarget => ratioContainer?.IsLoaded == true ? ratioContainer : base.AddTarget;
|
||||
protected override Container Content => ratioContainer?.IsLoaded == true ? ratioContainer : base.Content;
|
||||
|
||||
private RatioAdjust ratioContainer;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user