mirror of
https://github.com/ppy/osu.git
synced 2024-11-12 03:57:25 +08:00
Merge pull request #88 from peppy/general-fixes
General fixes & framework updates.
This commit is contained in:
commit
b514293004
@ -1 +1 @@
|
|||||||
Subproject commit 223c5a68dd795ff5859cf29decfeaa87915149fe
|
Subproject commit 8591632d904e83fd408a378bb753e884c82d6308
|
@ -25,12 +25,23 @@ namespace osu.Game
|
|||||||
public Options Options;
|
public Options Options;
|
||||||
public APIAccess API;
|
public APIAccess API;
|
||||||
|
|
||||||
protected override Container Content => ratioContainer?.IsLoaded == true ? ratioContainer : base.Content;
|
protected override Container Content => ratioContainer;
|
||||||
|
|
||||||
private RatioAdjust ratioContainer;
|
private RatioAdjust ratioContainer;
|
||||||
|
|
||||||
public CursorContainer Cursor;
|
public CursorContainer Cursor;
|
||||||
|
|
||||||
|
public OsuGameBase()
|
||||||
|
{
|
||||||
|
AddInternal(ratioContainer = new RatioAdjust());
|
||||||
|
|
||||||
|
Children = new Drawable[]
|
||||||
|
{
|
||||||
|
Options = new Options(),
|
||||||
|
Cursor = new OsuCursorContainer()
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
public override void Load(BaseGame game)
|
public override void Load(BaseGame game)
|
||||||
{
|
{
|
||||||
base.Load(game);
|
base.Load(game);
|
||||||
@ -50,18 +61,6 @@ namespace osu.Game
|
|||||||
Password = Config.Get<string>(OsuConfig.Password),
|
Password = Config.Get<string>(OsuConfig.Password),
|
||||||
Token = Config.Get<string>(OsuConfig.Token)
|
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()
|
protected override void Update()
|
||||||
|
@ -4,10 +4,11 @@ using osu.Framework.Graphics;
|
|||||||
using osu.Framework.Graphics.Containers;
|
using osu.Framework.Graphics.Containers;
|
||||||
using osu.Framework.Input;
|
using osu.Framework.Input;
|
||||||
using OpenTK;
|
using OpenTK;
|
||||||
|
using osu.Framework.Graphics.Primitives;
|
||||||
|
|
||||||
namespace osu.Game
|
namespace osu.Game
|
||||||
{
|
{
|
||||||
internal class VolumeControl : Container
|
internal class VolumeControl : AutoSizeContainer
|
||||||
{
|
{
|
||||||
private FlowContainer volumeMetersContainer;
|
private FlowContainer volumeMetersContainer;
|
||||||
private VolumeMeter volumeMeterMaster;
|
private VolumeMeter volumeMeterMaster;
|
||||||
@ -15,14 +16,14 @@ namespace osu.Game
|
|||||||
public BindableDouble VolumeSample { get; set; }
|
public BindableDouble VolumeSample { get; set; }
|
||||||
public BindableDouble VolumeTrack { get; set; }
|
public BindableDouble VolumeTrack { get; set; }
|
||||||
|
|
||||||
public VolumeControl()
|
public override bool Contains(Vector2 screenSpacePos) => true;
|
||||||
{
|
|
||||||
RelativeSizeAxes = Axes.Both;
|
|
||||||
}
|
|
||||||
|
|
||||||
private void volumeChanged(object sender, System.EventArgs e)
|
private void volumeChanged(object sender, System.EventArgs e)
|
||||||
{
|
{
|
||||||
appear();
|
appear();
|
||||||
|
|
||||||
|
Anchor = Anchor.BottomRight;
|
||||||
|
Origin = Anchor.BottomRight;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Load(BaseGame game)
|
public override void Load(BaseGame game)
|
||||||
|
Loading…
Reference in New Issue
Block a user