Move scaling container to OsuGame so OsuGameBase doesn't apply… (#6804)

Move scaling container to OsuGame so OsuGameBase doesn't apply UI scale
This commit is contained in:
Dean Herbert 2019-11-12 16:40:49 +09:00 committed by GitHub
commit faa5997b48
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 2 deletions

View File

@ -387,6 +387,8 @@ namespace osu.Game
protected virtual Loader CreateLoader() => new Loader();
protected override Container CreateScalingContainer() => new ScalingContainer(ScalingMode.Everything);
#region Beatmap progression
private void beatmapChanged(ValueChangedEvent<WorkingBeatmap> beatmap)

View File

@ -26,7 +26,6 @@ using osu.Framework.Input;
using osu.Framework.Logging;
using osu.Game.Audio;
using osu.Game.Database;
using osu.Game.Graphics.Containers;
using osu.Game.Input;
using osu.Game.Input.Bindings;
using osu.Game.IO;
@ -228,7 +227,7 @@ namespace osu.Game
Child = content = new OsuTooltipContainer(MenuCursorContainer.Cursor) { RelativeSizeAxes = Axes.Both }
};
base.Content.Add(new ScalingContainer(ScalingMode.Everything) { Child = MenuCursorContainer });
base.Content.Add(CreateScalingContainer().WithChild(MenuCursorContainer));
KeyBindingStore.Register(globalBinding);
dependencies.Cache(globalBinding);
@ -238,6 +237,8 @@ namespace osu.Game
Add(previewTrackManager);
}
protected virtual Container CreateScalingContainer() => new DrawSizePreservingFillContainer();
protected override void LoadComplete()
{
base.LoadComplete();