1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-15 09:02:55 +08:00

Merge pull request #169 from peppy/general-fixes

Update framework & minor fixes.
This commit is contained in:
Thomas Müller 2016-11-14 09:31:44 +01:00 committed by GitHub
commit 63f0a01888
3 changed files with 18 additions and 16 deletions

@ -1 +1 @@
Subproject commit 1cb936a4fe9e699ee37deb34eed0b04bc06167e3 Subproject commit 87a5cd4ce48d6370b8e392378289825f4b4a2039

View File

@ -11,20 +11,6 @@ namespace osu.Game.Beatmaps.Objects.Osu
{ {
public Vector2 Position { get; set; } public Vector2 Position { get; set; }
[Flags]
private enum HitObjectType
{
Circle = 1,
Slider = 2,
NewCombo = 4,
CircleNewCombo = 5,
SliderNewCombo = 6,
Spinner = 8,
ColourHax = 122,
Hold = 128,
ManiaLong = 128,
}
public static OsuBaseHit Parse(string val) public static OsuBaseHit Parse(string val)
{ {
string[] split = val.Split(','); string[] split = val.Split(',');
@ -54,5 +40,19 @@ namespace osu.Game.Beatmaps.Objects.Osu
// TODO: "addition" field // TODO: "addition" field
return result; return result;
} }
[Flags]
private enum HitObjectType
{
Circle = 1,
Slider = 2,
NewCombo = 4,
CircleNewCombo = 5,
SliderNewCombo = 6,
Spinner = 8,
ColourHax = 122,
Hold = 128,
ManiaLong = 128,
}
} }
} }

View File

@ -179,7 +179,9 @@ namespace osu.Game.Overlays
protected override bool OnDrag(InputState state) protected override bool OnDrag(InputState state)
{ {
Vector2 change = (state.Mouse.Position - state.Mouse.PositionMouseDown.Value); Vector2 change = (state.Mouse.Position - state.Mouse.PositionMouseDown.Value);
change.X = -change.X;
if ((Anchor & Anchor.x2) > 0)
change.X = -change.X;
change *= (float)Math.Pow(change.Length, 0.7f) / change.Length; change *= (float)Math.Pow(change.Length, 0.7f) / change.Length;