mirror of
https://github.com/ppy/osu.git
synced 2025-03-28 13:07:18 +08:00
Merge branch 'master' into fix-weird-import-fail
This commit is contained in:
commit
1a5e77ab40
@ -2,6 +2,9 @@ clone_depth: 1
|
|||||||
version: '{branch}-{build}'
|
version: '{branch}-{build}'
|
||||||
image: Visual Studio 2017
|
image: Visual Studio 2017
|
||||||
configuration: Debug
|
configuration: Debug
|
||||||
|
cache:
|
||||||
|
- C:\ProgramData\chocolatey\bin -> appveyor.yml
|
||||||
|
- C:\ProgramData\chocolatey\lib -> appveyor.yml
|
||||||
install:
|
install:
|
||||||
- cmd: git submodule update --init --recursive --depth=5
|
- cmd: git submodule update --init --recursive --depth=5
|
||||||
- cmd: choco install resharper-clt -y
|
- cmd: choco install resharper-clt -y
|
||||||
@ -18,4 +21,4 @@ build:
|
|||||||
verbosity: minimal
|
verbosity: minimal
|
||||||
after_build:
|
after_build:
|
||||||
- cmd: inspectcode --o="inspectcodereport.xml" --projects:osu.Game* --caches-home="inspectcode" osu.sln > NUL
|
- cmd: inspectcode --o="inspectcodereport.xml" --projects:osu.Game* --caches-home="inspectcode" osu.sln > NUL
|
||||||
- cmd: NVika parsereport "inspectcodereport.xml" --treatwarningsaserrors
|
- cmd: NVika parsereport "inspectcodereport.xml" --treatwarningsaserrors
|
||||||
|
@ -72,7 +72,7 @@ namespace osu.Desktop.Updater
|
|||||||
bestAsset = release.Assets?.FirstOrDefault(f => f.Name.EndsWith(".exe"));
|
bestAsset = release.Assets?.FirstOrDefault(f => f.Name.EndsWith(".exe"));
|
||||||
break;
|
break;
|
||||||
case RuntimeInfo.Platform.MacOsx:
|
case RuntimeInfo.Platform.MacOsx:
|
||||||
bestAsset = release.Assets?.FirstOrDefault(f => f.Name.EndsWith(".dmg"));
|
bestAsset = release.Assets?.FirstOrDefault(f => f.Name.EndsWith(".app.zip"));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -21,9 +21,9 @@ namespace osu.Game.Rulesets.Mania.Tests
|
|||||||
this.direction = direction;
|
this.direction = direction;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override IReadOnlyDependencyContainer CreateLocalDependencies(IReadOnlyDependencyContainer parent)
|
protected override IReadOnlyDependencyContainer CreateChildDependencies(IReadOnlyDependencyContainer parent)
|
||||||
{
|
{
|
||||||
var dependencies = new DependencyContainer(base.CreateLocalDependencies(parent));
|
var dependencies = new DependencyContainer(base.CreateChildDependencies(parent));
|
||||||
dependencies.CacheAs<IScrollingInfo>(new ScrollingInfo { Direction = { Value = direction }});
|
dependencies.CacheAs<IScrollingInfo>(new ScrollingInfo { Direction = { Value = direction }});
|
||||||
return dependencies;
|
return dependencies;
|
||||||
}
|
}
|
||||||
|
@ -137,9 +137,9 @@ namespace osu.Game.Rulesets.Mania.Tests
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override IReadOnlyDependencyContainer CreateLocalDependencies(IReadOnlyDependencyContainer parent)
|
protected override IReadOnlyDependencyContainer CreateChildDependencies(IReadOnlyDependencyContainer parent)
|
||||||
{
|
{
|
||||||
var dependencies = new DependencyContainer(base.CreateLocalDependencies(parent));
|
var dependencies = new DependencyContainer(base.CreateChildDependencies(parent));
|
||||||
dependencies.CacheAs<IBindable<ManiaAction>>(new Bindable<ManiaAction>());
|
dependencies.CacheAs<IBindable<ManiaAction>>(new Bindable<ManiaAction>());
|
||||||
return dependencies;
|
return dependencies;
|
||||||
}
|
}
|
||||||
|
@ -19,14 +19,14 @@ namespace osu.Game.Rulesets.Mania
|
|||||||
}
|
}
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(ManiaConfigManager config)
|
private void load()
|
||||||
{
|
{
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
new SettingsEnumDropdown<ManiaScrollingDirection>
|
new SettingsEnumDropdown<ManiaScrollingDirection>
|
||||||
{
|
{
|
||||||
LabelText = "Scrolling direction",
|
LabelText = "Scrolling direction",
|
||||||
Bindable = config.GetBindable<ManiaScrollingDirection>(ManiaSetting.ScrollDirection)
|
Bindable = ((ManiaConfigManager)Config).GetBindable<ManiaScrollingDirection>(ManiaSetting.ScrollDirection)
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -118,9 +118,9 @@ namespace osu.Game.Rulesets.Mania.UI
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override IReadOnlyDependencyContainer CreateLocalDependencies(IReadOnlyDependencyContainer parent)
|
protected override IReadOnlyDependencyContainer CreateChildDependencies(IReadOnlyDependencyContainer parent)
|
||||||
{
|
{
|
||||||
var dependencies = new DependencyContainer(base.CreateLocalDependencies(parent));
|
var dependencies = new DependencyContainer(base.CreateChildDependencies(parent));
|
||||||
dependencies.CacheAs<IBindable<ManiaAction>>(Action);
|
dependencies.CacheAs<IBindable<ManiaAction>>(Action);
|
||||||
return dependencies;
|
return dependencies;
|
||||||
}
|
}
|
||||||
|
@ -70,19 +70,19 @@ namespace osu.Game.Rulesets.Mania.UI
|
|||||||
}
|
}
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(ManiaConfigManager config)
|
private void load()
|
||||||
{
|
{
|
||||||
BarLines.ForEach(Playfield.Add);
|
BarLines.ForEach(Playfield.Add);
|
||||||
|
|
||||||
config.BindWith(ManiaSetting.ScrollDirection, configDirection);
|
((ManiaConfigManager)Config).BindWith(ManiaSetting.ScrollDirection, configDirection);
|
||||||
configDirection.BindValueChanged(d => scrollingInfo.Direction.Value = (ScrollingDirection)d, true);
|
configDirection.BindValueChanged(d => scrollingInfo.Direction.Value = (ScrollingDirection)d, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
private DependencyContainer dependencies;
|
private DependencyContainer dependencies;
|
||||||
|
|
||||||
protected override IReadOnlyDependencyContainer CreateLocalDependencies(IReadOnlyDependencyContainer parent)
|
protected override IReadOnlyDependencyContainer CreateChildDependencies(IReadOnlyDependencyContainer parent)
|
||||||
{
|
{
|
||||||
dependencies = new DependencyContainer(base.CreateLocalDependencies(parent));
|
dependencies = new DependencyContainer(base.CreateChildDependencies(parent));
|
||||||
dependencies.CacheAs<IScrollingInfo>(scrollingInfo = new ScrollingInfo());
|
dependencies.CacheAs<IScrollingInfo>(scrollingInfo = new ScrollingInfo());
|
||||||
return dependencies;
|
return dependencies;
|
||||||
}
|
}
|
||||||
|
28
osu.Game.Tests/Visual/TestCaseDisclaimer.cs
Normal file
28
osu.Game.Tests/Visual/TestCaseDisclaimer.cs
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
// Copyright (c) 2007-2018 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.Shapes;
|
||||||
|
using osu.Game.Screens.Menu;
|
||||||
|
using OpenTK.Graphics;
|
||||||
|
|
||||||
|
namespace osu.Game.Tests.Visual
|
||||||
|
{
|
||||||
|
public class TestCaseDisclaimer : OsuTestCase
|
||||||
|
{
|
||||||
|
[BackgroundDependencyLoader]
|
||||||
|
private void load()
|
||||||
|
{
|
||||||
|
Children = new Drawable[]
|
||||||
|
{
|
||||||
|
new Box
|
||||||
|
{
|
||||||
|
RelativeSizeAxes = Axes.Both,
|
||||||
|
Colour = Color4.Black,
|
||||||
|
},
|
||||||
|
new Disclaimer()
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -6,7 +6,6 @@ using System.Collections.Generic;
|
|||||||
using NUnit.Framework;
|
using NUnit.Framework;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Framework.Graphics.Shapes;
|
using osu.Framework.Graphics.Shapes;
|
||||||
using osu.Framework.Timing;
|
|
||||||
using osu.Game.Screens;
|
using osu.Game.Screens;
|
||||||
using osu.Game.Screens.Menu;
|
using osu.Game.Screens.Menu;
|
||||||
using OpenTK.Graphics;
|
using OpenTK.Graphics;
|
||||||
@ -23,19 +22,15 @@ namespace osu.Game.Tests.Visual
|
|||||||
|
|
||||||
public TestCaseOsuGame()
|
public TestCaseOsuGame()
|
||||||
{
|
{
|
||||||
var rateAdjustClock = new StopwatchClock(true);
|
Children = new Drawable[]
|
||||||
var framedClock = new FramedClock(rateAdjustClock);
|
|
||||||
framedClock.ProcessFrame();
|
|
||||||
|
|
||||||
Add(new Box
|
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both,
|
new Box
|
||||||
Colour = Color4.Black,
|
{
|
||||||
});
|
RelativeSizeAxes = Axes.Both,
|
||||||
|
Colour = Color4.Black,
|
||||||
Add(new Loader());
|
},
|
||||||
|
new Loader()
|
||||||
AddSliderStep("Playback speed", 0.0, 2.0, 1, v => rateAdjustClock.Rate = v);
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -14,9 +14,9 @@ namespace osu.Game.Tests.Visual
|
|||||||
{
|
{
|
||||||
private readonly PreviewTrackManager trackManager = new TestPreviewTrackManager();
|
private readonly PreviewTrackManager trackManager = new TestPreviewTrackManager();
|
||||||
|
|
||||||
protected override IReadOnlyDependencyContainer CreateLocalDependencies(IReadOnlyDependencyContainer parent)
|
protected override IReadOnlyDependencyContainer CreateChildDependencies(IReadOnlyDependencyContainer parent)
|
||||||
{
|
{
|
||||||
var dependencies = new DependencyContainer(base.CreateLocalDependencies(parent));
|
var dependencies = new DependencyContainer(base.CreateChildDependencies(parent));
|
||||||
dependencies.CacheAs(trackManager);
|
dependencies.CacheAs(trackManager);
|
||||||
dependencies.CacheAs<IPreviewTrackOwner>(this);
|
dependencies.CacheAs<IPreviewTrackOwner>(this);
|
||||||
return dependencies;
|
return dependencies;
|
||||||
@ -101,9 +101,9 @@ namespace osu.Game.Tests.Visual
|
|||||||
AddInternal(track);
|
AddInternal(track);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override IReadOnlyDependencyContainer CreateLocalDependencies(IReadOnlyDependencyContainer parent)
|
protected override IReadOnlyDependencyContainer CreateChildDependencies(IReadOnlyDependencyContainer parent)
|
||||||
{
|
{
|
||||||
var dependencies = new DependencyContainer(base.CreateLocalDependencies(parent));
|
var dependencies = new DependencyContainer(base.CreateChildDependencies(parent));
|
||||||
dependencies.CacheAs<IPreviewTrackOwner>(this);
|
dependencies.CacheAs<IPreviewTrackOwner>(this);
|
||||||
return dependencies;
|
return dependencies;
|
||||||
}
|
}
|
||||||
|
@ -26,9 +26,9 @@ namespace osu.Game.Graphics.Containers
|
|||||||
|
|
||||||
protected readonly Bindable<OverlayActivation> OverlayActivationMode = new Bindable<OverlayActivation>(OverlayActivation.All);
|
protected readonly Bindable<OverlayActivation> OverlayActivationMode = new Bindable<OverlayActivation>(OverlayActivation.All);
|
||||||
|
|
||||||
protected override IReadOnlyDependencyContainer CreateLocalDependencies(IReadOnlyDependencyContainer parent)
|
protected override IReadOnlyDependencyContainer CreateChildDependencies(IReadOnlyDependencyContainer parent)
|
||||||
{
|
{
|
||||||
var dependencies = new DependencyContainer(base.CreateLocalDependencies(parent));
|
var dependencies = new DependencyContainer(base.CreateChildDependencies(parent));
|
||||||
dependencies.CacheAs<IPreviewTrackOwner>(this);
|
dependencies.CacheAs<IPreviewTrackOwner>(this);
|
||||||
return dependencies;
|
return dependencies;
|
||||||
}
|
}
|
||||||
|
@ -21,6 +21,8 @@ namespace osu.Game.Graphics.Cursor
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected override double AppearDelay => (1 - CurrentTooltip.Alpha) * base.AppearDelay; // reduce appear delay if the tooltip is already partly visible.
|
||||||
|
|
||||||
public class OsuTooltip : Tooltip
|
public class OsuTooltip : Tooltip
|
||||||
{
|
{
|
||||||
private readonly Box background;
|
private readonly Box background;
|
||||||
|
@ -122,8 +122,8 @@ namespace osu.Game
|
|||||||
|
|
||||||
private DependencyContainer dependencies;
|
private DependencyContainer dependencies;
|
||||||
|
|
||||||
protected override IReadOnlyDependencyContainer CreateLocalDependencies(IReadOnlyDependencyContainer parent) =>
|
protected override IReadOnlyDependencyContainer CreateChildDependencies(IReadOnlyDependencyContainer parent) =>
|
||||||
dependencies = new DependencyContainer(base.CreateLocalDependencies(parent));
|
dependencies = new DependencyContainer(base.CreateChildDependencies(parent));
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(FrameworkConfigManager frameworkConfig)
|
private void load(FrameworkConfigManager frameworkConfig)
|
||||||
|
@ -95,8 +95,8 @@ namespace osu.Game
|
|||||||
|
|
||||||
private DependencyContainer dependencies;
|
private DependencyContainer dependencies;
|
||||||
|
|
||||||
protected override IReadOnlyDependencyContainer CreateLocalDependencies(IReadOnlyDependencyContainer parent) =>
|
protected override IReadOnlyDependencyContainer CreateChildDependencies(IReadOnlyDependencyContainer parent) =>
|
||||||
dependencies = new DependencyContainer(base.CreateLocalDependencies(parent));
|
dependencies = new DependencyContainer(base.CreateChildDependencies(parent));
|
||||||
|
|
||||||
private DatabaseContextFactory contextFactory;
|
private DatabaseContextFactory contextFactory;
|
||||||
|
|
||||||
|
@ -102,6 +102,7 @@ namespace osu.Game.Overlays.KeyBinding
|
|||||||
RelativeSizeAxes = Axes.X,
|
RelativeSizeAxes = Axes.X,
|
||||||
AutoSizeAxes = Axes.Y,
|
AutoSizeAxes = Axes.Y,
|
||||||
Margin = new MarginPadding(padding),
|
Margin = new MarginPadding(padding),
|
||||||
|
Padding = new MarginPadding { Top = height },
|
||||||
Alpha = 0,
|
Alpha = 0,
|
||||||
Colour = colours.YellowDark
|
Colour = colours.YellowDark
|
||||||
}
|
}
|
||||||
@ -267,7 +268,7 @@ namespace osu.Game.Overlays.KeyBinding
|
|||||||
GetContainingInputManager().ChangeFocus(null);
|
GetContainingInputManager().ChangeFocus(null);
|
||||||
|
|
||||||
pressAKey.FadeOut(300, Easing.OutQuint);
|
pressAKey.FadeOut(300, Easing.OutQuint);
|
||||||
pressAKey.Padding = new MarginPadding { Top = height, Bottom = -pressAKey.DrawHeight };
|
pressAKey.BypassAutoSizeAxes |= Axes.Y;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void OnFocus(InputState state)
|
protected override void OnFocus(InputState state)
|
||||||
@ -276,7 +277,7 @@ namespace osu.Game.Overlays.KeyBinding
|
|||||||
AutoSizeEasing = Easing.OutQuint;
|
AutoSizeEasing = Easing.OutQuint;
|
||||||
|
|
||||||
pressAKey.FadeIn(300, Easing.OutQuint);
|
pressAKey.FadeIn(300, Easing.OutQuint);
|
||||||
pressAKey.Padding = new MarginPadding { Top = height };
|
pressAKey.BypassAutoSizeAxes &= ~Axes.Y;
|
||||||
|
|
||||||
updateBindTarget();
|
updateBindTarget();
|
||||||
base.OnFocus(state);
|
base.OnFocus(state);
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
|
|
||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
using osu.Game.Rulesets;
|
using osu.Game.Rulesets;
|
||||||
|
using osu.Game.Rulesets.Configuration;
|
||||||
|
|
||||||
namespace osu.Game.Overlays.Settings
|
namespace osu.Game.Overlays.Settings
|
||||||
{
|
{
|
||||||
@ -14,6 +15,8 @@ namespace osu.Game.Overlays.Settings
|
|||||||
{
|
{
|
||||||
private readonly Ruleset ruleset;
|
private readonly Ruleset ruleset;
|
||||||
|
|
||||||
|
protected IRulesetConfigManager Config;
|
||||||
|
|
||||||
protected RulesetSettingsSubsection(Ruleset ruleset)
|
protected RulesetSettingsSubsection(Ruleset ruleset)
|
||||||
{
|
{
|
||||||
this.ruleset = ruleset;
|
this.ruleset = ruleset;
|
||||||
@ -21,13 +24,13 @@ namespace osu.Game.Overlays.Settings
|
|||||||
|
|
||||||
private DependencyContainer dependencies;
|
private DependencyContainer dependencies;
|
||||||
|
|
||||||
protected override IReadOnlyDependencyContainer CreateLocalDependencies(IReadOnlyDependencyContainer parent)
|
protected override IReadOnlyDependencyContainer CreateChildDependencies(IReadOnlyDependencyContainer parent)
|
||||||
{
|
{
|
||||||
dependencies = new DependencyContainer(base.CreateLocalDependencies(parent));
|
dependencies = new DependencyContainer(base.CreateChildDependencies(parent));
|
||||||
|
|
||||||
var config = dependencies.Get<RulesetConfigCache>().GetConfigFor(ruleset);
|
Config = dependencies.Get<RulesetConfigCache>().GetConfigFor(ruleset);
|
||||||
if (config != null)
|
if (Config != null)
|
||||||
dependencies.Cache(config);
|
dependencies.Cache(Config);
|
||||||
|
|
||||||
return dependencies;
|
return dependencies;
|
||||||
}
|
}
|
||||||
|
@ -70,7 +70,8 @@ namespace osu.Game.Rulesets.UI
|
|||||||
|
|
||||||
protected readonly Ruleset Ruleset;
|
protected readonly Ruleset Ruleset;
|
||||||
|
|
||||||
private IRulesetConfigManager rulesetConfig;
|
protected IRulesetConfigManager Config { get; private set; }
|
||||||
|
|
||||||
private OnScreenDisplay onScreenDisplay;
|
private OnScreenDisplay onScreenDisplay;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -85,17 +86,17 @@ namespace osu.Game.Rulesets.UI
|
|||||||
Cursor = CreateCursor();
|
Cursor = CreateCursor();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override IReadOnlyDependencyContainer CreateLocalDependencies(IReadOnlyDependencyContainer parent)
|
protected override IReadOnlyDependencyContainer CreateChildDependencies(IReadOnlyDependencyContainer parent)
|
||||||
{
|
{
|
||||||
var dependencies = new DependencyContainer(base.CreateLocalDependencies(parent));
|
var dependencies = new DependencyContainer(base.CreateChildDependencies(parent));
|
||||||
|
|
||||||
onScreenDisplay = dependencies.Get<OnScreenDisplay>();
|
onScreenDisplay = dependencies.Get<OnScreenDisplay>();
|
||||||
|
|
||||||
rulesetConfig = dependencies.Get<RulesetConfigCache>().GetConfigFor(Ruleset);
|
Config = dependencies.Get<RulesetConfigCache>().GetConfigFor(Ruleset);
|
||||||
if (rulesetConfig != null)
|
if (Config != null)
|
||||||
{
|
{
|
||||||
dependencies.Cache(rulesetConfig);
|
dependencies.Cache(Config);
|
||||||
onScreenDisplay?.BeginTracking(this, rulesetConfig);
|
onScreenDisplay?.BeginTracking(this, Config);
|
||||||
}
|
}
|
||||||
|
|
||||||
return dependencies;
|
return dependencies;
|
||||||
@ -143,10 +144,10 @@ namespace osu.Game.Rulesets.UI
|
|||||||
{
|
{
|
||||||
base.Dispose(isDisposing);
|
base.Dispose(isDisposing);
|
||||||
|
|
||||||
if (rulesetConfig != null)
|
if (Config != null)
|
||||||
{
|
{
|
||||||
onScreenDisplay?.StopTracking(this, rulesetConfig);
|
onScreenDisplay?.StopTracking(this, Config);
|
||||||
rulesetConfig = null;
|
Config = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -222,23 +222,16 @@ namespace osu.Game.Rulesets.UI
|
|||||||
mouseDisabled = config.GetBindable<bool>(OsuSetting.MouseDisableButtons);
|
mouseDisabled = config.GetBindable<bool>(OsuSetting.MouseDisableButtons);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void TransformState(InputState state)
|
protected override bool OnMouseDown(InputState state, MouseDownEventArgs args)
|
||||||
{
|
{
|
||||||
base.TransformState(state);
|
if (mouseDisabled.Value && (args.Button == MouseButton.Left || args.Button == MouseButton.Right)) return false;
|
||||||
|
return base.OnMouseDown(state, args);
|
||||||
|
}
|
||||||
|
|
||||||
// we don't want to transform the state if a replay is present (for now, at least).
|
protected override bool OnMouseUp(InputState state, MouseUpEventArgs args)
|
||||||
if (replayInputHandler != null) return;
|
{
|
||||||
|
if (!CurrentState.Mouse.IsPressed(args.Button)) return false;
|
||||||
var mouse = state.Mouse as Framework.Input.MouseState;
|
return base.OnMouseUp(state, args);
|
||||||
|
|
||||||
if (mouse != null)
|
|
||||||
{
|
|
||||||
if (mouseDisabled.Value)
|
|
||||||
{
|
|
||||||
mouse.SetPressed(MouseButton.Left, false);
|
|
||||||
mouse.SetPressed(MouseButton.Right, false);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
@ -42,8 +42,8 @@ namespace osu.Game.Screens.Edit
|
|||||||
private DependencyContainer dependencies;
|
private DependencyContainer dependencies;
|
||||||
private GameHost host;
|
private GameHost host;
|
||||||
|
|
||||||
protected override IReadOnlyDependencyContainer CreateLocalDependencies(IReadOnlyDependencyContainer parent)
|
protected override IReadOnlyDependencyContainer CreateChildDependencies(IReadOnlyDependencyContainer parent)
|
||||||
=> dependencies = new DependencyContainer(base.CreateLocalDependencies(parent));
|
=> dependencies = new DependencyContainer(base.CreateChildDependencies(parent));
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(OsuColour colours, GameHost host)
|
private void load(OsuColour colours, GameHost host)
|
||||||
|
@ -3,10 +3,9 @@
|
|||||||
|
|
||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Framework.Graphics.Containers;
|
|
||||||
using osu.Framework.Screens;
|
using osu.Framework.Screens;
|
||||||
using osu.Game.Graphics;
|
using osu.Game.Graphics;
|
||||||
using osu.Game.Graphics.Sprites;
|
using osu.Game.Graphics.Containers;
|
||||||
using OpenTK;
|
using OpenTK;
|
||||||
using OpenTK.Graphics;
|
using OpenTK.Graphics;
|
||||||
using osu.Game.Overlays;
|
using osu.Game.Overlays;
|
||||||
@ -16,96 +15,89 @@ namespace osu.Game.Screens.Menu
|
|||||||
public class Disclaimer : OsuScreen
|
public class Disclaimer : OsuScreen
|
||||||
{
|
{
|
||||||
private Intro intro;
|
private Intro intro;
|
||||||
private readonly SpriteIcon icon;
|
private SpriteIcon icon;
|
||||||
private Color4 iconColour;
|
private Color4 iconColour;
|
||||||
|
private LinkFlowContainer textFlow;
|
||||||
|
|
||||||
protected override bool HideOverlaysOnEnter => true;
|
protected override bool HideOverlaysOnEnter => true;
|
||||||
protected override OverlayActivation InitialOverlayActivationMode => OverlayActivation.Disabled;
|
protected override OverlayActivation InitialOverlayActivationMode => OverlayActivation.Disabled;
|
||||||
|
|
||||||
public override bool CursorVisible => false;
|
public override bool CursorVisible => false;
|
||||||
|
|
||||||
|
private const float icon_y = -0.09f;
|
||||||
|
|
||||||
public Disclaimer()
|
public Disclaimer()
|
||||||
{
|
{
|
||||||
ValidForResume = false;
|
ValidForResume = false;
|
||||||
|
|
||||||
Children = new Drawable[]
|
|
||||||
{
|
|
||||||
new FillFlowContainer
|
|
||||||
{
|
|
||||||
AutoSizeAxes = Axes.Both,
|
|
||||||
Anchor = Anchor.Centre,
|
|
||||||
Origin = Anchor.Centre,
|
|
||||||
Direction = FillDirection.Vertical,
|
|
||||||
Spacing = new Vector2(0, 2),
|
|
||||||
Children = new Drawable[]
|
|
||||||
{
|
|
||||||
icon = new SpriteIcon
|
|
||||||
{
|
|
||||||
Anchor = Anchor.TopCentre,
|
|
||||||
Origin = Anchor.TopCentre,
|
|
||||||
Icon = FontAwesome.fa_warning,
|
|
||||||
Size = new Vector2(30),
|
|
||||||
},
|
|
||||||
new OsuSpriteText
|
|
||||||
{
|
|
||||||
Anchor = Anchor.TopCentre,
|
|
||||||
Origin = Anchor.TopCentre,
|
|
||||||
TextSize = 30,
|
|
||||||
Text = "This is a development build",
|
|
||||||
Margin = new MarginPadding
|
|
||||||
{
|
|
||||||
Bottom = 20
|
|
||||||
},
|
|
||||||
},
|
|
||||||
new OsuSpriteText
|
|
||||||
{
|
|
||||||
Anchor = Anchor.TopCentre,
|
|
||||||
Origin = Anchor.TopCentre,
|
|
||||||
Text = "Don't expect shit to work perfectly as this is very much a work in progress."
|
|
||||||
},
|
|
||||||
new OsuSpriteText
|
|
||||||
{
|
|
||||||
Anchor = Anchor.TopCentre,
|
|
||||||
Origin = Anchor.TopCentre,
|
|
||||||
Text = "Don't report bugs because we are aware. Don't complain about missing features because we are adding them."
|
|
||||||
},
|
|
||||||
new OsuSpriteText
|
|
||||||
{
|
|
||||||
Anchor = Anchor.TopCentre,
|
|
||||||
Origin = Anchor.TopCentre,
|
|
||||||
Text = "Sit back and enjoy. Visit discord.gg/ppy if you want to help out!",
|
|
||||||
Margin = new MarginPadding { Bottom = 20 },
|
|
||||||
},
|
|
||||||
new OsuSpriteText
|
|
||||||
{
|
|
||||||
Anchor = Anchor.TopCentre,
|
|
||||||
Origin = Anchor.TopCentre,
|
|
||||||
TextSize = 12,
|
|
||||||
Text = "oh and yes, you will get seizures.",
|
|
||||||
},
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(OsuColour colours)
|
private void load(OsuColour colours)
|
||||||
{
|
{
|
||||||
LoadComponentAsync(intro = new Intro());
|
Children = new Drawable[]
|
||||||
|
{
|
||||||
|
icon = new SpriteIcon
|
||||||
|
{
|
||||||
|
Anchor = Anchor.Centre,
|
||||||
|
Origin = Anchor.Centre,
|
||||||
|
Icon = FontAwesome.fa_warning,
|
||||||
|
Size = new Vector2(30),
|
||||||
|
RelativePositionAxes = Axes.Both,
|
||||||
|
Y = icon_y,
|
||||||
|
},
|
||||||
|
textFlow = new LinkFlowContainer
|
||||||
|
{
|
||||||
|
RelativeSizeAxes = Axes.X,
|
||||||
|
AutoSizeAxes = Axes.Y,
|
||||||
|
Padding = new MarginPadding(50),
|
||||||
|
TextAnchor = Anchor.TopCentre,
|
||||||
|
Anchor = Anchor.Centre,
|
||||||
|
Origin = Anchor.Centre,
|
||||||
|
Spacing = new Vector2(0, 2),
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
textFlow.AddText("This is an ", t =>
|
||||||
|
{
|
||||||
|
t.TextSize = 30;
|
||||||
|
t.Font = @"Exo2.0-Light";
|
||||||
|
});
|
||||||
|
textFlow.AddText("early development build", t =>
|
||||||
|
{
|
||||||
|
t.TextSize = 30;
|
||||||
|
t.Font = @"Exo2.0-SemiBold";
|
||||||
|
});
|
||||||
|
|
||||||
|
textFlow.AddParagraph("Don't expect everything to work perfectly.");
|
||||||
|
textFlow.AddParagraph("");
|
||||||
|
textFlow.AddParagraph("Detailed bug reports are welcomed via github issues.");
|
||||||
|
textFlow.AddParagraph("");
|
||||||
|
|
||||||
|
textFlow.AddText("Visit ");
|
||||||
|
textFlow.AddLink("discord.gg/ppy", "https://discord.gg/ppy");
|
||||||
|
textFlow.AddText(" if you want to help out or follow progress!");
|
||||||
|
|
||||||
iconColour = colours.Yellow;
|
iconColour = colours.Yellow;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected override void LoadComplete()
|
||||||
|
{
|
||||||
|
base.LoadComplete();
|
||||||
|
LoadComponentAsync(intro = new Intro());
|
||||||
|
}
|
||||||
|
|
||||||
protected override void OnEntering(Screen last)
|
protected override void OnEntering(Screen last)
|
||||||
{
|
{
|
||||||
base.OnEntering(last);
|
base.OnEntering(last);
|
||||||
|
|
||||||
icon.Delay(1500).FadeColour(iconColour, 200);
|
icon.Delay(1500).FadeColour(iconColour, 200, Easing.OutQuint);
|
||||||
|
icon.Delay(1500).MoveToY(icon_y * 1.1f, 100, Easing.OutCirc).Then().MoveToY(icon_y, 100, Easing.InCirc);
|
||||||
|
|
||||||
Content
|
Content
|
||||||
.FadeInFromZero(500)
|
.FadeInFromZero(500)
|
||||||
.Then(5500)
|
.Then(5500)
|
||||||
.FadeOut(250)
|
.FadeOut(250)
|
||||||
|
.ScaleTo(0.9f, 250, Easing.InQuint)
|
||||||
.Finally(d => Push(intro));
|
.Finally(d => Push(intro));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -19,6 +19,7 @@ using osu.Game.Graphics.Backgrounds;
|
|||||||
using osu.Game.Graphics.Containers;
|
using osu.Game.Graphics.Containers;
|
||||||
using OpenTK;
|
using OpenTK;
|
||||||
using OpenTK.Graphics;
|
using OpenTK.Graphics;
|
||||||
|
using OpenTK.Input;
|
||||||
|
|
||||||
namespace osu.Game.Screens.Menu
|
namespace osu.Game.Screens.Menu
|
||||||
{
|
{
|
||||||
@ -345,12 +346,16 @@ namespace osu.Game.Screens.Menu
|
|||||||
|
|
||||||
protected override bool OnMouseDown(InputState state, MouseDownEventArgs args)
|
protected override bool OnMouseDown(InputState state, MouseDownEventArgs args)
|
||||||
{
|
{
|
||||||
|
if (args.Button != MouseButton.Left) return false;
|
||||||
|
|
||||||
logoBounceContainer.ScaleTo(0.9f, 1000, Easing.Out);
|
logoBounceContainer.ScaleTo(0.9f, 1000, Easing.Out);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override bool OnMouseUp(InputState state, MouseUpEventArgs args)
|
protected override bool OnMouseUp(InputState state, MouseUpEventArgs args)
|
||||||
{
|
{
|
||||||
|
if (args.Button != MouseButton.Left) return false;
|
||||||
|
|
||||||
logoBounceContainer.ScaleTo(1f, 500, Easing.OutElastic);
|
logoBounceContainer.ScaleTo(1f, 500, Easing.OutElastic);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -69,8 +69,8 @@ namespace osu.Game.Screens.Select
|
|||||||
|
|
||||||
private DependencyContainer dependencies;
|
private DependencyContainer dependencies;
|
||||||
|
|
||||||
protected override IReadOnlyDependencyContainer CreateLocalDependencies(IReadOnlyDependencyContainer parent)
|
protected override IReadOnlyDependencyContainer CreateChildDependencies(IReadOnlyDependencyContainer parent)
|
||||||
=> dependencies = new DependencyContainer(base.CreateLocalDependencies(parent));
|
=> dependencies = new DependencyContainer(base.CreateChildDependencies(parent));
|
||||||
|
|
||||||
protected SongSelect()
|
protected SongSelect()
|
||||||
{
|
{
|
||||||
|
@ -49,8 +49,8 @@ namespace osu.Game.Screens.Tournament
|
|||||||
|
|
||||||
private DependencyContainer dependencies;
|
private DependencyContainer dependencies;
|
||||||
|
|
||||||
protected override IReadOnlyDependencyContainer CreateLocalDependencies(IReadOnlyDependencyContainer parent) =>
|
protected override IReadOnlyDependencyContainer CreateChildDependencies(IReadOnlyDependencyContainer parent) =>
|
||||||
dependencies = new DependencyContainer(base.CreateLocalDependencies(parent));
|
dependencies = new DependencyContainer(base.CreateChildDependencies(parent));
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(TextureStore textures, Storage storage)
|
private void load(TextureStore textures, Storage storage)
|
||||||
|
@ -71,9 +71,9 @@ namespace osu.Game.Skinning
|
|||||||
|
|
||||||
private void onSourceChanged() => SourceChanged?.Invoke();
|
private void onSourceChanged() => SourceChanged?.Invoke();
|
||||||
|
|
||||||
protected override IReadOnlyDependencyContainer CreateLocalDependencies(IReadOnlyDependencyContainer parent)
|
protected override IReadOnlyDependencyContainer CreateChildDependencies(IReadOnlyDependencyContainer parent)
|
||||||
{
|
{
|
||||||
var dependencies = new DependencyContainer(base.CreateLocalDependencies(parent));
|
var dependencies = new DependencyContainer(base.CreateChildDependencies(parent));
|
||||||
|
|
||||||
fallbackSource = dependencies.Get<ISkinSource>();
|
fallbackSource = dependencies.Get<ISkinSource>();
|
||||||
dependencies.CacheAs<ISkinSource>(this);
|
dependencies.CacheAs<ISkinSource>(this);
|
||||||
|
@ -36,8 +36,8 @@ namespace osu.Game.Storyboards.Drawables
|
|||||||
public override bool RemoveCompletedTransforms => false;
|
public override bool RemoveCompletedTransforms => false;
|
||||||
|
|
||||||
private DependencyContainer dependencies;
|
private DependencyContainer dependencies;
|
||||||
protected override IReadOnlyDependencyContainer CreateLocalDependencies(IReadOnlyDependencyContainer parent) =>
|
protected override IReadOnlyDependencyContainer CreateChildDependencies(IReadOnlyDependencyContainer parent) =>
|
||||||
dependencies = new DependencyContainer(base.CreateLocalDependencies(parent));
|
dependencies = new DependencyContainer(base.CreateChildDependencies(parent));
|
||||||
|
|
||||||
public DrawableStoryboard(Storyboard storyboard)
|
public DrawableStoryboard(Storyboard storyboard)
|
||||||
{
|
{
|
||||||
|
@ -25,9 +25,9 @@ namespace osu.Game.Tests.Visual
|
|||||||
Clock = new EditorClock(new ControlPointInfo(), 5000, BeatDivisor) { IsCoupled = false };
|
Clock = new EditorClock(new ControlPointInfo(), 5000, BeatDivisor) { IsCoupled = false };
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override IReadOnlyDependencyContainer CreateLocalDependencies(IReadOnlyDependencyContainer parent)
|
protected override IReadOnlyDependencyContainer CreateChildDependencies(IReadOnlyDependencyContainer parent)
|
||||||
{
|
{
|
||||||
var dependencies = new DependencyContainer(base.CreateLocalDependencies(parent));
|
var dependencies = new DependencyContainer(base.CreateChildDependencies(parent));
|
||||||
|
|
||||||
dependencies.Cache(BeatDivisor);
|
dependencies.Cache(BeatDivisor);
|
||||||
dependencies.CacheAs<IFrameBasedClock>(Clock);
|
dependencies.CacheAs<IFrameBasedClock>(Clock);
|
||||||
|
@ -20,9 +20,9 @@ namespace osu.Game.Tests.Visual
|
|||||||
|
|
||||||
protected DependencyContainer Dependencies { get; private set; }
|
protected DependencyContainer Dependencies { get; private set; }
|
||||||
|
|
||||||
protected override IReadOnlyDependencyContainer CreateLocalDependencies(IReadOnlyDependencyContainer parent)
|
protected override IReadOnlyDependencyContainer CreateChildDependencies(IReadOnlyDependencyContainer parent)
|
||||||
{
|
{
|
||||||
Dependencies = new DependencyContainer(base.CreateLocalDependencies(parent));
|
Dependencies = new DependencyContainer(base.CreateChildDependencies(parent));
|
||||||
|
|
||||||
Dependencies.CacheAs<BindableBeatmap>(beatmap);
|
Dependencies.CacheAs<BindableBeatmap>(beatmap);
|
||||||
Dependencies.CacheAs<IBindableBeatmap>(beatmap);
|
Dependencies.CacheAs<IBindableBeatmap>(beatmap);
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="2.1.1" />
|
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="2.1.1" />
|
||||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite.Core" Version="2.1.1" />
|
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite.Core" Version="2.1.1" />
|
||||||
<PackageReference Include="Newtonsoft.Json" Version="11.0.2" />
|
<PackageReference Include="Newtonsoft.Json" Version="11.0.2" />
|
||||||
<PackageReference Include="ppy.osu.Framework" Version="2018.710.0" />
|
<PackageReference Include="ppy.osu.Framework" Version="2018.712.0" />
|
||||||
<PackageReference Include="SharpCompress" Version="0.17.1" />
|
<PackageReference Include="SharpCompress" Version="0.17.1" />
|
||||||
<PackageReference Include="NUnit" Version="3.10.1" />
|
<PackageReference Include="NUnit" Version="3.10.1" />
|
||||||
<PackageReference Include="System.ComponentModel.Annotations" Version="4.5.0" />
|
<PackageReference Include="System.ComponentModel.Annotations" Version="4.5.0" />
|
||||||
|
Loading…
x
Reference in New Issue
Block a user