osu/osu.Game/Rulesets/Edit/HitObjectComposer.cs

32 lines
859 B
C#
Raw Normal View History

2017-11-29 07:22:11 +00:00
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
2017-11-29 07:22:11 +00:00
namespace osu.Game.Rulesets.Edit
{
public abstract class HitObjectComposer : CompositeDrawable
2017-11-29 07:22:11 +00:00
{
private readonly Ruleset ruleset;
public HitObjectComposer(Ruleset ruleset)
{
this.ruleset = ruleset;
RelativeSizeAxes = Axes.Both;
}
2017-11-29 07:22:11 +00:00
[BackgroundDependencyLoader]
private void load(OsuGameBase osuGame)
{
try
{
InternalChild = ruleset.CreateRulesetContainerWith(osuGame.Beatmap.Value, true);
}
catch { }
}
2017-11-29 07:22:11 +00:00
}
}