mirror of
https://github.com/osukey/osukey.git
synced 2025-08-08 09:03:50 +09:00
Merge remote-tracking branch 'upstream/master' into revert-to-default-glow
This commit is contained in:
@ -0,0 +1,79 @@
|
|||||||
|
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
||||||
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||||
|
|
||||||
|
using System;
|
||||||
|
using osu.Framework.Graphics;
|
||||||
|
using osu.Game.Rulesets.Objects.Drawables;
|
||||||
|
using OpenTK;
|
||||||
|
using osu.Game.Graphics;
|
||||||
|
using osu.Game.Rulesets.Osu.Judgements;
|
||||||
|
|
||||||
|
namespace osu.Game.Rulesets.Osu.Objects.Drawables
|
||||||
|
{
|
||||||
|
public class DrawableRepeatPoint : DrawableOsuHitObject
|
||||||
|
{
|
||||||
|
private readonly RepeatPoint repeatPoint;
|
||||||
|
private readonly DrawableSlider drawableSlider;
|
||||||
|
|
||||||
|
public double FadeInTime;
|
||||||
|
public double FadeOutTime;
|
||||||
|
|
||||||
|
public override bool RemoveWhenNotAlive => false;
|
||||||
|
|
||||||
|
public DrawableRepeatPoint(RepeatPoint repeatPoint, DrawableSlider drawableSlider) : base(repeatPoint)
|
||||||
|
{
|
||||||
|
this.repeatPoint = repeatPoint;
|
||||||
|
this.drawableSlider = drawableSlider;
|
||||||
|
|
||||||
|
AutoSizeAxes = Axes.Both;
|
||||||
|
Blending = BlendingMode.Additive;
|
||||||
|
Origin = Anchor.Centre;
|
||||||
|
|
||||||
|
Children = new Drawable[]
|
||||||
|
{
|
||||||
|
new SpriteIcon
|
||||||
|
{
|
||||||
|
Icon = FontAwesome.fa_eercast,
|
||||||
|
Anchor = Anchor.Centre,
|
||||||
|
Origin = Anchor.Centre,
|
||||||
|
Size = new Vector2(32),
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void CheckForJudgements(bool userTriggered, double timeOffset)
|
||||||
|
{
|
||||||
|
if (repeatPoint.StartTime <= Time.Current)
|
||||||
|
AddJudgement(new OsuJudgement { Result = drawableSlider.Tracking ? HitResult.Great : HitResult.Miss });
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void UpdatePreemptState()
|
||||||
|
{
|
||||||
|
var animIn = Math.Min(150, repeatPoint.StartTime - FadeInTime);
|
||||||
|
|
||||||
|
this.Animate(
|
||||||
|
d => d.FadeIn(animIn),
|
||||||
|
d => d.ScaleTo(0.5f).ScaleTo(1.2f, animIn)
|
||||||
|
).Then(
|
||||||
|
d => d.ScaleTo(1, 150, Easing.Out)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void UpdateCurrentState(ArmedState state)
|
||||||
|
{
|
||||||
|
switch (state)
|
||||||
|
{
|
||||||
|
case ArmedState.Idle:
|
||||||
|
this.Delay(FadeOutTime - repeatPoint.StartTime).FadeOut();
|
||||||
|
break;
|
||||||
|
case ArmedState.Miss:
|
||||||
|
this.FadeOut(160);
|
||||||
|
break;
|
||||||
|
case ArmedState.Hit:
|
||||||
|
this.FadeOut(120, Easing.OutQuint)
|
||||||
|
.ScaleTo(Scale * 1.5f, 120, Easing.OutQuint);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -21,15 +21,13 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
|
|||||||
private readonly List<ISliderProgress> components = new List<ISliderProgress>();
|
private readonly List<ISliderProgress> components = new List<ISliderProgress>();
|
||||||
|
|
||||||
private readonly Container<DrawableSliderTick> ticks;
|
private readonly Container<DrawableSliderTick> ticks;
|
||||||
|
private readonly Container<DrawableRepeatPoint> repeatPoints;
|
||||||
|
|
||||||
private readonly SliderBody body;
|
private readonly SliderBody body;
|
||||||
private readonly SliderBall ball;
|
private readonly SliderBall ball;
|
||||||
|
|
||||||
private readonly SliderBouncer bouncer2;
|
|
||||||
|
|
||||||
public DrawableSlider(Slider s) : base(s)
|
public DrawableSlider(Slider s) : base(s)
|
||||||
{
|
{
|
||||||
SliderBouncer bouncer1;
|
|
||||||
slider = s;
|
slider = s;
|
||||||
|
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
@ -41,16 +39,7 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
|
|||||||
PathWidth = s.Scale * 64,
|
PathWidth = s.Scale * 64,
|
||||||
},
|
},
|
||||||
ticks = new Container<DrawableSliderTick>(),
|
ticks = new Container<DrawableSliderTick>(),
|
||||||
bouncer1 = new SliderBouncer(s, false)
|
repeatPoints = new Container<DrawableRepeatPoint>(),
|
||||||
{
|
|
||||||
Position = s.Curve.PositionAt(1),
|
|
||||||
Scale = new Vector2(s.Scale),
|
|
||||||
},
|
|
||||||
bouncer2 = new SliderBouncer(s, true)
|
|
||||||
{
|
|
||||||
Position = s.StackedPosition,
|
|
||||||
Scale = new Vector2(s.Scale),
|
|
||||||
},
|
|
||||||
ball = new SliderBall(s)
|
ball = new SliderBall(s)
|
||||||
{
|
{
|
||||||
Scale = new Vector2(s.Scale),
|
Scale = new Vector2(s.Scale),
|
||||||
@ -70,8 +59,6 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
|
|||||||
|
|
||||||
components.Add(body);
|
components.Add(body);
|
||||||
components.Add(ball);
|
components.Add(ball);
|
||||||
components.Add(bouncer1);
|
|
||||||
components.Add(bouncer2);
|
|
||||||
|
|
||||||
AddNested(initialCircle);
|
AddNested(initialCircle);
|
||||||
|
|
||||||
@ -92,14 +79,34 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
|
|||||||
ticks.Add(drawableTick);
|
ticks.Add(drawableTick);
|
||||||
AddNested(drawableTick);
|
AddNested(drawableTick);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
foreach (var repeatPoint in s.RepeatPoints)
|
||||||
|
{
|
||||||
|
var repeatStartTime = s.StartTime + repeatPoint.RepeatIndex * repeatDuration;
|
||||||
|
var fadeInTime = repeatStartTime + (repeatPoint.StartTime - repeatStartTime) / 2 - (repeatPoint.RepeatIndex == 0 ? TIME_FADEIN : TIME_FADEIN / 2);
|
||||||
|
var fadeOutTime = repeatStartTime + repeatDuration;
|
||||||
|
|
||||||
|
var drawableRepeatPoint = new DrawableRepeatPoint(repeatPoint, this)
|
||||||
|
{
|
||||||
|
FadeInTime = fadeInTime,
|
||||||
|
FadeOutTime = fadeOutTime,
|
||||||
|
Position = repeatPoint.Position,
|
||||||
|
};
|
||||||
|
|
||||||
|
repeatPoints.Add(drawableRepeatPoint);
|
||||||
|
AddNested(drawableRepeatPoint);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private int currentRepeat;
|
private int currentRepeat;
|
||||||
|
public bool Tracking;
|
||||||
|
|
||||||
protected override void Update()
|
protected override void Update()
|
||||||
{
|
{
|
||||||
base.Update();
|
base.Update();
|
||||||
|
|
||||||
|
Tracking = ball.Tracking;
|
||||||
|
|
||||||
double progress = MathHelper.Clamp((Time.Current - slider.StartTime) / slider.Duration, 0, 1);
|
double progress = MathHelper.Clamp((Time.Current - slider.StartTime) / slider.Duration, 0, 1);
|
||||||
|
|
||||||
int repeat = slider.RepeatAt(progress);
|
int repeat = slider.RepeatAt(progress);
|
||||||
@ -112,8 +119,6 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
|
|||||||
currentRepeat = repeat;
|
currentRepeat = repeat;
|
||||||
}
|
}
|
||||||
|
|
||||||
bouncer2.Position = slider.Curve.PositionAt(body.SnakedEnd ?? 0);
|
|
||||||
|
|
||||||
//todo: we probably want to reconsider this before adding scoring, but it looks and feels nice.
|
//todo: we probably want to reconsider this before adding scoring, but it looks and feels nice.
|
||||||
if (!initialCircle.Judgements.Any(j => j.IsHit))
|
if (!initialCircle.Judgements.Any(j => j.IsHit))
|
||||||
initialCircle.Position = slider.Curve.PositionAt(progress);
|
initialCircle.Position = slider.Curve.PositionAt(progress);
|
||||||
@ -126,12 +131,12 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
|
|||||||
{
|
{
|
||||||
if (!userTriggered && Time.Current >= slider.EndTime)
|
if (!userTriggered && Time.Current >= slider.EndTime)
|
||||||
{
|
{
|
||||||
var ticksCount = ticks.Children.Count + 1;
|
var judgementsCount = ticks.Children.Count + repeatPoints.Children.Count + 1;
|
||||||
var ticksHit = ticks.Children.Count(t => t.Judgements.Any(j => j.IsHit));
|
var judgementsHit = ticks.Children.Count(t => t.Judgements.Any(j => j.IsHit)) + repeatPoints.Children.Count(t => t.Judgements.Any(j => j.IsHit));
|
||||||
if (initialCircle.Judgements.Any(j => j.IsHit))
|
if (initialCircle.Judgements.Any(j => j.IsHit))
|
||||||
ticksHit++;
|
judgementsHit++;
|
||||||
|
|
||||||
var hitFraction = (double)ticksHit / ticksCount;
|
var hitFraction = (double)judgementsHit / judgementsCount;
|
||||||
if (hitFraction == 1 && initialCircle.Judgements.Any(j => j.Result == HitResult.Great))
|
if (hitFraction == 1 && initialCircle.Judgements.Any(j => j.Result == HitResult.Great))
|
||||||
AddJudgement(new OsuJudgement { Result = HitResult.Great });
|
AddJudgement(new OsuJudgement { Result = HitResult.Great });
|
||||||
else if (hitFraction >= 0.5 && initialCircle.Judgements.Any(j => j.Result >= HitResult.Good))
|
else if (hitFraction >= 0.5 && initialCircle.Judgements.Any(j => j.Result >= HitResult.Good))
|
||||||
|
@ -1,52 +0,0 @@
|
|||||||
// 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.Graphics;
|
|
||||||
using osu.Framework.Graphics.Containers;
|
|
||||||
using osu.Game.Graphics;
|
|
||||||
using OpenTK;
|
|
||||||
|
|
||||||
namespace osu.Game.Rulesets.Osu.Objects.Drawables.Pieces
|
|
||||||
{
|
|
||||||
public class SliderBouncer : Container, ISliderProgress
|
|
||||||
{
|
|
||||||
private readonly Slider slider;
|
|
||||||
private readonly bool isEnd;
|
|
||||||
private readonly SpriteIcon icon;
|
|
||||||
|
|
||||||
public SliderBouncer(Slider slider, bool isEnd)
|
|
||||||
{
|
|
||||||
this.slider = slider;
|
|
||||||
this.isEnd = isEnd;
|
|
||||||
|
|
||||||
AutoSizeAxes = Axes.Both;
|
|
||||||
Blending = BlendingMode.Additive;
|
|
||||||
Origin = Anchor.Centre;
|
|
||||||
|
|
||||||
Children = new Drawable[]
|
|
||||||
{
|
|
||||||
icon = new SpriteIcon
|
|
||||||
{
|
|
||||||
Icon = FontAwesome.fa_eercast,
|
|
||||||
Anchor = Anchor.Centre,
|
|
||||||
Origin = Anchor.Centre,
|
|
||||||
Size = new Vector2(48),
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
protected override void LoadComplete()
|
|
||||||
{
|
|
||||||
base.LoadComplete();
|
|
||||||
icon.Spin(1000, RotationDirection.Clockwise);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void UpdateProgress(double progress, int repeat)
|
|
||||||
{
|
|
||||||
if (Time.Current < slider.StartTime)
|
|
||||||
Alpha = 0;
|
|
||||||
|
|
||||||
Alpha = repeat + 1 < slider.RepeatCount && repeat % 2 == (isEnd ? 0 : 1) ? 1 : 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
10
osu.Game.Rulesets.Osu/Objects/RepeatPoint.cs
Normal file
10
osu.Game.Rulesets.Osu/Objects/RepeatPoint.cs
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
||||||
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||||
|
|
||||||
|
namespace osu.Game.Rulesets.Osu.Objects
|
||||||
|
{
|
||||||
|
public class RepeatPoint : OsuHitObject
|
||||||
|
{
|
||||||
|
public int RepeatIndex { get; set; }
|
||||||
|
}
|
||||||
|
}
|
@ -131,5 +131,33 @@ namespace osu.Game.Rulesets.Osu.Objects
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
public IEnumerable<RepeatPoint> RepeatPoints
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
var length = Curve.Distance;
|
||||||
|
var repeatPointDistance = Math.Min(Distance, length);
|
||||||
|
var repeatDuration = length / Velocity;
|
||||||
|
|
||||||
|
for (var repeat = 1; repeat < RepeatCount; repeat++)
|
||||||
|
{
|
||||||
|
for (var d = repeatPointDistance; d <= length; d += repeatPointDistance)
|
||||||
|
{
|
||||||
|
var repeatStartTime = StartTime + repeat * repeatDuration;
|
||||||
|
var distanceProgress = d / length;
|
||||||
|
|
||||||
|
yield return new RepeatPoint
|
||||||
|
{
|
||||||
|
RepeatIndex = repeat,
|
||||||
|
StartTime = repeatStartTime,
|
||||||
|
Position = Curve.PositionAt(distanceProgress),
|
||||||
|
StackHeight = StackHeight,
|
||||||
|
Scale = Scale,
|
||||||
|
ComboColour = ComboColour,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -41,6 +41,10 @@ namespace osu.Game.Rulesets.Osu.Scoring
|
|||||||
// Ticks
|
// Ticks
|
||||||
foreach (var unused in slider.Ticks)
|
foreach (var unused in slider.Ticks)
|
||||||
AddJudgement(new OsuJudgement { Result = HitResult.Great });
|
AddJudgement(new OsuJudgement { Result = HitResult.Great });
|
||||||
|
|
||||||
|
//Repeats
|
||||||
|
foreach (var unused in slider.RepeatPoints)
|
||||||
|
AddJudgement(new OsuJudgement { Result = HitResult.Great });
|
||||||
}
|
}
|
||||||
|
|
||||||
AddJudgement(new OsuJudgement { Result = HitResult.Great });
|
AddJudgement(new OsuJudgement { Result = HitResult.Great });
|
||||||
|
@ -53,6 +53,7 @@
|
|||||||
<Compile Include="Objects\Drawables\Connections\ConnectionRenderer.cs" />
|
<Compile Include="Objects\Drawables\Connections\ConnectionRenderer.cs" />
|
||||||
<Compile Include="Objects\Drawables\Connections\FollowPointRenderer.cs" />
|
<Compile Include="Objects\Drawables\Connections\FollowPointRenderer.cs" />
|
||||||
<Compile Include="Judgements\OsuJudgement.cs" />
|
<Compile Include="Judgements\OsuJudgement.cs" />
|
||||||
|
<Compile Include="Objects\Drawables\DrawableRepeatPoint.cs" />
|
||||||
<Compile Include="Objects\Drawables\Pieces\ApproachCircle.cs" />
|
<Compile Include="Objects\Drawables\Pieces\ApproachCircle.cs" />
|
||||||
<Compile Include="Objects\Drawables\Pieces\SpinnerBackground.cs" />
|
<Compile Include="Objects\Drawables\Pieces\SpinnerBackground.cs" />
|
||||||
<Compile Include="Objects\Drawables\Pieces\CirclePiece.cs" />
|
<Compile Include="Objects\Drawables\Pieces\CirclePiece.cs" />
|
||||||
@ -66,13 +67,13 @@
|
|||||||
<Compile Include="Objects\Drawables\Pieces\NumberPiece.cs" />
|
<Compile Include="Objects\Drawables\Pieces\NumberPiece.cs" />
|
||||||
<Compile Include="Objects\Drawables\DrawableSliderTick.cs" />
|
<Compile Include="Objects\Drawables\DrawableSliderTick.cs" />
|
||||||
<Compile Include="Objects\Drawables\Pieces\RingPiece.cs" />
|
<Compile Include="Objects\Drawables\Pieces\RingPiece.cs" />
|
||||||
<Compile Include="Objects\Drawables\Pieces\SliderBouncer.cs" />
|
|
||||||
<Compile Include="Objects\Drawables\Pieces\SpinnerDisc.cs" />
|
<Compile Include="Objects\Drawables\Pieces\SpinnerDisc.cs" />
|
||||||
<Compile Include="Objects\Drawables\Pieces\SpinnerSpmCounter.cs" />
|
<Compile Include="Objects\Drawables\Pieces\SpinnerSpmCounter.cs" />
|
||||||
<Compile Include="Objects\Drawables\Pieces\SpinnerTicks.cs" />
|
<Compile Include="Objects\Drawables\Pieces\SpinnerTicks.cs" />
|
||||||
<Compile Include="Objects\Drawables\Pieces\TrianglesPiece.cs" />
|
<Compile Include="Objects\Drawables\Pieces\TrianglesPiece.cs" />
|
||||||
<Compile Include="Objects\Drawables\Pieces\SliderBall.cs" />
|
<Compile Include="Objects\Drawables\Pieces\SliderBall.cs" />
|
||||||
<Compile Include="Objects\Drawables\Pieces\SliderBody.cs" />
|
<Compile Include="Objects\Drawables\Pieces\SliderBody.cs" />
|
||||||
|
<Compile Include="Objects\RepeatPoint.cs" />
|
||||||
<Compile Include="Objects\SliderTick.cs" />
|
<Compile Include="Objects\SliderTick.cs" />
|
||||||
<Compile Include="OsuDifficulty\OsuDifficultyCalculator.cs" />
|
<Compile Include="OsuDifficulty\OsuDifficultyCalculator.cs" />
|
||||||
<Compile Include="OsuDifficulty\Preprocessing\OsuDifficultyBeatmap.cs" />
|
<Compile Include="OsuDifficulty\Preprocessing\OsuDifficultyBeatmap.cs" />
|
||||||
|
@ -180,13 +180,15 @@ namespace osu.Game.Database
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
// will fail if EF hasn't touched the database yet.
|
// will fail if the database isn't in a sane EF-migrated state.
|
||||||
Database.ExecuteSqlCommand("SELECT * FROM __EFMigrationsHistory LIMIT 1");
|
Database.ExecuteSqlCommand("SELECT MetadataID FROM BeatmapSetInfo LIMIT 1");
|
||||||
}
|
}
|
||||||
catch
|
catch
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
Database.ExecuteSqlCommand("DROP TABLE IF EXISTS __EFMigrationsHistory");
|
||||||
|
|
||||||
// will fail (intentionally) if we don't have sqlite-net data present.
|
// will fail (intentionally) if we don't have sqlite-net data present.
|
||||||
Database.ExecuteSqlCommand("SELECT OnlineBeatmapSetId FROM BeatmapMetadata LIMIT 1");
|
Database.ExecuteSqlCommand("SELECT OnlineBeatmapSetId FROM BeatmapMetadata LIMIT 1");
|
||||||
|
|
||||||
|
@ -6,6 +6,7 @@ using System.Collections.Generic;
|
|||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
using osu.Framework.Input.Bindings;
|
using osu.Framework.Input.Bindings;
|
||||||
using osu.Game.Rulesets;
|
using osu.Game.Rulesets;
|
||||||
|
using System.Linq;
|
||||||
|
|
||||||
namespace osu.Game.Input.Bindings
|
namespace osu.Game.Input.Bindings
|
||||||
{
|
{
|
||||||
@ -44,11 +45,15 @@ namespace osu.Game.Input.Bindings
|
|||||||
private void load(KeyBindingStore keyBindings)
|
private void load(KeyBindingStore keyBindings)
|
||||||
{
|
{
|
||||||
store = keyBindings;
|
store = keyBindings;
|
||||||
|
store.KeyBindingChanged += ReloadMappings;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void ReloadMappings()
|
protected override void Dispose(bool isDisposing)
|
||||||
{
|
{
|
||||||
KeyBindings = store.Query(ruleset?.ID, variant);
|
base.Dispose(isDisposing);
|
||||||
|
store.KeyBindingChanged -= ReloadMappings;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected override void ReloadMappings() => KeyBindings = store.Query(ruleset?.ID, variant).ToList();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -15,6 +15,8 @@ namespace osu.Game.Input
|
|||||||
{
|
{
|
||||||
public class KeyBindingStore : DatabaseBackedStore
|
public class KeyBindingStore : DatabaseBackedStore
|
||||||
{
|
{
|
||||||
|
public event Action KeyBindingChanged;
|
||||||
|
|
||||||
public KeyBindingStore(Func<OsuDbContext> getContext, RulesetStore rulesets, Storage storage = null)
|
public KeyBindingStore(Func<OsuDbContext> getContext, RulesetStore rulesets, Storage storage = null)
|
||||||
: base(getContext, storage)
|
: base(getContext, storage)
|
||||||
{
|
{
|
||||||
@ -36,8 +38,9 @@ namespace osu.Game.Input
|
|||||||
|
|
||||||
private void insertDefaults(IEnumerable<KeyBinding> defaults, int? rulesetId = null, int? variant = null)
|
private void insertDefaults(IEnumerable<KeyBinding> defaults, int? rulesetId = null, int? variant = null)
|
||||||
{
|
{
|
||||||
var context = GetContext();
|
using (var context = GetContext())
|
||||||
|
using (var transaction = context.Database.BeginTransaction())
|
||||||
|
{
|
||||||
// compare counts in database vs defaults
|
// compare counts in database vs defaults
|
||||||
foreach (var group in defaults.GroupBy(k => k.Action))
|
foreach (var group in defaults.GroupBy(k => k.Action))
|
||||||
{
|
{
|
||||||
@ -59,6 +62,8 @@ namespace osu.Game.Input
|
|||||||
}
|
}
|
||||||
|
|
||||||
context.SaveChanges();
|
context.SaveChanges();
|
||||||
|
transaction.Commit();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -77,6 +82,8 @@ namespace osu.Game.Input
|
|||||||
var context = GetContext();
|
var context = GetContext();
|
||||||
context.Update(keyBinding);
|
context.Update(keyBinding);
|
||||||
context.SaveChanges();
|
context.SaveChanges();
|
||||||
|
|
||||||
|
KeyBindingChanged?.Invoke();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -146,6 +146,7 @@
|
|||||||
<HintPath>$(SolutionDir)\packages\Microsoft.Extensions.Primitives.2.0.0\lib\netstandard2.0\Microsoft.Extensions.Primitives.dll</HintPath>
|
<HintPath>$(SolutionDir)\packages\Microsoft.Extensions.Primitives.2.0.0\lib\netstandard2.0\Microsoft.Extensions.Primitives.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="mscorlib" />
|
<Reference Include="mscorlib" />
|
||||||
|
<Reference Include="netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51" />
|
||||||
<Reference Include="Newtonsoft.Json, Version=10.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
<Reference Include="Newtonsoft.Json, Version=10.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||||
<HintPath>$(SolutionDir)\packages\Newtonsoft.Json.10.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
|
<HintPath>$(SolutionDir)\packages\Newtonsoft.Json.10.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||||
<Private>True</Private>
|
<Private>True</Private>
|
||||||
@ -282,7 +283,7 @@
|
|||||||
<Compile Include="Beatmaps\Drawables\BeatmapSetHeader.cs" />
|
<Compile Include="Beatmaps\Drawables\BeatmapSetHeader.cs" />
|
||||||
<Compile Include="Database\DatabaseContextFactory.cs" />
|
<Compile Include="Database\DatabaseContextFactory.cs" />
|
||||||
<Compile Include="Migrations\20171019041408_InitialCreate.cs" />
|
<Compile Include="Migrations\20171019041408_InitialCreate.cs" />
|
||||||
<Compile Include="Migrations\20171019041408_InitialCreate.designer.cs">
|
<Compile Include="Migrations\20171019041408_InitialCreate.Designer.cs">
|
||||||
<DependentUpon>20171019041408_InitialCreate.cs</DependentUpon>
|
<DependentUpon>20171019041408_InitialCreate.cs</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="Migrations\OsuDbContextModelSnapshot.cs" />
|
<Compile Include="Migrations\OsuDbContextModelSnapshot.cs" />
|
||||||
|
Reference in New Issue
Block a user