1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-23 02:07:24 +08:00

Merge pull request #88 from peppy/general-fixes

General fixes & framework updates.
This commit is contained in:
Thomas Müller 2016-10-16 15:09:12 +02:00 committed by GitHub
commit b514293004
3 changed files with 19 additions and 19 deletions

@ -1 +1 @@
Subproject commit 223c5a68dd795ff5859cf29decfeaa87915149fe
Subproject commit 8591632d904e83fd408a378bb753e884c82d6308

View File

@ -25,12 +25,23 @@ namespace osu.Game
public Options Options;
public APIAccess API;
protected override Container Content => ratioContainer?.IsLoaded == true ? ratioContainer : base.Content;
protected override Container Content => ratioContainer;
private RatioAdjust ratioContainer;
public CursorContainer Cursor;
public OsuGameBase()
{
AddInternal(ratioContainer = new RatioAdjust());
Children = new Drawable[]
{
Options = new Options(),
Cursor = new OsuCursorContainer()
};
}
public override void Load(BaseGame game)
{
base.Load(game);
@ -50,18 +61,6 @@ namespace osu.Game
Password = Config.Get<string>(OsuConfig.Password),
Token = Config.Get<string>(OsuConfig.Token)
};
Add(new Drawable[]
{
ratioContainer = new RatioAdjust
{
Children = new Drawable[]
{
Options = new Options(),
Cursor = new OsuCursorContainer()
}
}
});
}
protected override void Update()

View File

@ -4,10 +4,11 @@ using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Input;
using OpenTK;
using osu.Framework.Graphics.Primitives;
namespace osu.Game
{
internal class VolumeControl : Container
internal class VolumeControl : AutoSizeContainer
{
private FlowContainer volumeMetersContainer;
private VolumeMeter volumeMeterMaster;
@ -15,14 +16,14 @@ namespace osu.Game
public BindableDouble VolumeSample { get; set; }
public BindableDouble VolumeTrack { get; set; }
public VolumeControl()
{
RelativeSizeAxes = Axes.Both;
}
public override bool Contains(Vector2 screenSpacePos) => true;
private void volumeChanged(object sender, System.EventArgs e)
{
appear();
Anchor = Anchor.BottomRight;
Origin = Anchor.BottomRight;
}
public override void Load(BaseGame game)