1
0
mirror of https://github.com/ppy/osu.git synced 2025-03-23 18:10:01 +08:00

Merge branch 'master'

This commit is contained in:
Huo Yaoyuan 2016-11-07 18:58:35 +08:00
commit 8037f1233f
22 changed files with 842 additions and 544 deletions

@ -1 +1 @@
Subproject commit 7d0cb3b1db8f9f684e83000431689c27e3e0f619
Subproject commit 9e9145afcd1d37c56f89a6ae6e7b59e43d51037e

@ -1 +1 @@
Subproject commit 5ce263988735b3f15c1195568b65fef40756198c
Subproject commit 10dd6161a65972c53e310e26a09c92cffca33a08

View File

@ -75,7 +75,9 @@
<Name>osu.Game.Resources</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup />
<ItemGroup>
<Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
</ItemGroup>
<ItemGroup>
<Compile Include="Beatmaps\IO\OszArchiveReaderTest.cs" />
<Compile Include="Beatmaps\IO\ImportBeatmapTest.cs" />
@ -86,4 +88,4 @@
<EmbeddedResource Include="Resources\Soleily - Renatus %28Gamu%29 [Insane].osu" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
</Project>
</Project>

View File

@ -48,7 +48,7 @@ namespace osu.Game.Beatmaps.Drawable
Origin = Anchor.CentreLeft,
Children = new Framework.Graphics.Drawable[]
{
new DifficultyIcon(FontAwesome.dot_circle_o, new Color4(159, 198, 0, 255))
new DifficultyIcon(FontAwesome.fa_dot_circle_o, new Color4(159, 198, 0, 255))
{
Scale = new Vector2(1.8f),
Anchor = Anchor.CentreLeft,

View File

@ -40,7 +40,7 @@ namespace osu.Game.Beatmaps.Drawable
Texture = working.Background,
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
Scale = new Vector2(0.5f),
Scale = new Vector2(1366 / working.Background.Width * 0.6f),
Colour = new Color4(200, 200, 200, 255),
},
new FlowContainer
@ -68,8 +68,8 @@ namespace osu.Game.Beatmaps.Drawable
AutoSizeAxes = Axes.Both,
Children = new[]
{
new DifficultyIcon(FontAwesome.dot_circle_o, new Color4(159, 198, 0, 255)),
new DifficultyIcon(FontAwesome.dot_circle_o, new Color4(246, 101, 166, 255)),
new DifficultyIcon(FontAwesome.fa_dot_circle_o, new Color4(159, 198, 0, 255)),
new DifficultyIcon(FontAwesome.fa_dot_circle_o, new Color4(246, 101, 166, 255)),
}
}
}

View File

@ -52,7 +52,7 @@ namespace osu.Game.Beatmaps.Objects
if (AllowHit?.Invoke(this) == false)
return false;
HitTime = Time;
HitTime = Time.Current;
State = ArmedState.Armed;
return true;
@ -70,7 +70,7 @@ namespace osu.Game.Beatmaps.Objects
{
base.Update();
if (Time >= HitObject.EndTime && !counted)
if (Time.Current >= HitObject.EndTime && !counted)
{
counted = true;
if (state == ArmedState.Armed)

View File

@ -96,7 +96,7 @@ namespace osu.Game.Beatmaps.Objects.Osu.Drawable
approachCircle.Transforms.Add(new TransformScale { StartTime = t - 1000, EndTime = t, StartValue = new Vector2(2f), EndValue = new Vector2(0.6f) });
//set transform delay to t==hitTime
Delay(t - Time, true);
Delay(t - Time.Current, true);
approachCircle.FadeOut();
glow.FadeOut(400);
@ -331,7 +331,7 @@ namespace osu.Game.Beatmaps.Objects.Osu.Drawable
base.Update();
foreach (Framework.Graphics.Drawable d in Children)
d.Position -= new Vector2(0, (float)(d.Scale.X * (Clock.ElapsedFrameTime / 2880)));
d.Position -= new Vector2(0, (float)(d.Scale.X * (Time.Elapsed / 2880)));
}
}
}

View File

@ -65,6 +65,7 @@ namespace osu.Game.GameModes.Menu
Scale = new Vector2(0, 1),
Size = boxSize,
Shear = new Vector2(ButtonSystem.wedge_width / boxSize.Y, 0),
EdgeSmoothness = new Vector2(2, 0),
},
iconText = new Container
{
@ -112,7 +113,7 @@ namespace osu.Game.GameModes.Menu
icon.ScaleTo(1, 500, EasingTypes.OutElasticHalf);
double offset = 0; //(1 - Game.Audio.SyncBeatProgress) * duration;
double startTime = Time + offset;
double startTime = Time.Current + offset;
icon.RotateTo(10, offset, EasingTypes.InOutSine);
icon.ScaleTo(new Vector2(1, 0.9f), offset, EasingTypes.Out);

View File

@ -84,7 +84,7 @@ namespace osu.Game.GameModes.Menu
Spacing = new Vector2(-wedge_width, 0),
Children = new[]
{
settingsButton = new Button(@"settings", @"options", FontAwesome.gear, new Color4(85, 85, 85, 255), () => OnSettings?.Invoke(), -wedge_width, Key.O),
settingsButton = new Button(@"settings", @"options", FontAwesome.fa_gear, new Color4(85, 85, 85, 255), () => OnSettings?.Invoke(), -wedge_width, Key.O),
backButton = new Button(@"back", @"back", FontAwesome.fa_osu_left_o, new Color4(51, 58, 94, 255), onBack, -wedge_width, Key.Escape),
iconFacade = new Container //need a container to make the osu! icon flow properly.
{
@ -105,8 +105,8 @@ namespace osu.Game.GameModes.Menu
buttonFlow.Position = new Vector2(wedge_width * 2 - (button_width + osuLogo.SizeForFlow / 4), 0);
buttonsPlay.Add(new Button(@"solo", @"freeplay", FontAwesome.user, new Color4(102, 68, 204, 255), OnSolo, wedge_width, Key.P));
buttonsPlay.Add(new Button(@"multi", @"multiplayer", FontAwesome.users, new Color4(94, 63, 186, 255), OnMulti, 0, Key.M));
buttonsPlay.Add(new Button(@"solo", @"freeplay", FontAwesome.fa_user, new Color4(102, 68, 204, 255), OnSolo, wedge_width, Key.P));
buttonsPlay.Add(new Button(@"multi", @"multiplayer", FontAwesome.fa_users, new Color4(94, 63, 186, 255), OnMulti, 0, Key.M));
buttonsPlay.Add(new Button(@"chart", @"charts", FontAwesome.fa_osu_charts, new Color4(80, 53, 160, 255), OnChart));
buttonsTopLevel.Add(new Button(@"play", @"play", FontAwesome.fa_osu_logo, new Color4(102, 68, 204, 255), onPlay, wedge_width, Key.P));

View File

@ -205,8 +205,13 @@ namespace osu.Game.GameModes.Play
private void updateCount(ulong value, bool rolling = false)
{
ulong prevCount = count;
count = value;
if (!IsLoaded)
return;
ulong prevCount = count;
if (!rolling)
{
Flush(false, typeof(TransformComboRoll));
@ -229,17 +234,14 @@ namespace osu.Game.GameModes.Play
{
Flush(false, typeof(TransformComboRoll));
if (Clock == null)
return;
if (RollingDuration < 1)
{
DisplayedCount = Count;
return;
}
transform.StartTime = Time;
transform.EndTime = Time + getProportionalDuration(currentValue, newValue);
transform.StartTime = Time.Current;
transform.EndTime = Time.Current + getProportionalDuration(currentValue, newValue);
transform.StartValue = currentValue;
transform.EndValue = newValue;
transform.Easing = RollingEasing;
@ -253,7 +255,7 @@ namespace osu.Game.GameModes.Play
{
get
{
double time = CurrentTime ?? 0;
double time = Time?.Current ?? 0;
if (time < StartTime) return StartValue;
if (time >= EndTime) return EndValue;

View File

@ -45,7 +45,7 @@ namespace osu.Game.GameModes.Play
{
get
{
double time = CurrentTime ?? 0;
double time = Time?.Current ?? 0;
if (time < StartTime) return StartValue;
if (time >= EndTime) return EndValue;

View File

@ -31,9 +31,9 @@ namespace osu.Game.GameModes.Play.Mania
protected override float PopOutInitialAlpha => 1.0f;
protected override double PopOutDuration => 300;
protected override void Load(BaseGame game)
protected override void LoadComplete()
{
base.Load(game);
base.LoadComplete();
PopOutSpriteText.Anchor = Anchor.BottomCentre;
PopOutSpriteText.Origin = Anchor.Centre;

View File

@ -59,6 +59,7 @@ namespace osu.Game.GameModes.Play
Size = new Vector2(1, 0.5f),
Colour = new Color4(0, 0, 0, 0.5f),
Shear = new Vector2(0.15f, 0),
EdgeSmoothness = new Vector2(2, 0),
},
new Box
{
@ -68,6 +69,7 @@ namespace osu.Game.GameModes.Play
Position = new Vector2(0, 1),
Colour = new Color4(0, 0, 0, 0.5f),
Shear = new Vector2(-0.15f, 0),
EdgeSmoothness = new Vector2(2, 0),
},
}
},

File diff suppressed because it is too large Load Diff

View File

@ -123,8 +123,6 @@ namespace osu.Game.Graphics.UserInterface
{
base.Load(game);
Flush(false, TransformType);
DisplayedCount = Count;
DisplayedCountSpriteText.Text = FormatCount(count);
@ -132,6 +130,13 @@ namespace osu.Game.Graphics.UserInterface
DisplayedCountSpriteText.Origin = this.Origin;
}
protected override void LoadComplete()
{
base.LoadComplete();
Flush(false, TransformType);
}
/// <summary>
/// Sets count value, bypassing rollover animation.
/// </summary>
@ -211,9 +216,6 @@ namespace osu.Game.Graphics.UserInterface
Flush(false, type);
if (Clock == null)
return;
if (RollingDuration < 1)
{
DisplayedCount = Count;
@ -225,8 +227,8 @@ namespace osu.Game.Graphics.UserInterface
? GetProportionalDuration(currentValue, newValue)
: RollingDuration;
transform.StartTime = Time;
transform.EndTime = Time + rollingTotalDuration;
transform.StartTime = Time.Current;
transform.EndTime = Time.Current + rollingTotalDuration;
transform.StartValue = currentValue;
transform.EndValue = newValue;
transform.Easing = RollingEasing;

View File

@ -60,7 +60,7 @@ namespace osu.Game.Graphics.UserInterface
{
get
{
double time = CurrentTime ?? 0;
double time = Time?.Current ?? 0;
if (time < StartTime) return StartValue;
if (time >= EndTime) return EndValue;

View File

@ -50,7 +50,7 @@ namespace osu.Game.Graphics.UserInterface
{
get
{
double elapsedTime = Time - transformStartTime;
double elapsedTime = Time.Current - transformStartTime;
double expectedElapsedTime = Math.Abs(prevCount - count) * animationDelay;
if (elapsedTime >= expectedElapsedTime)
return count;
@ -70,14 +70,16 @@ namespace osu.Game.Graphics.UserInterface
{
return count;
}
set
{
prevCount = VisibleValue;
count = value;
if (IsLoaded)
{
transformCount(prevCount, count);
prevCount = VisibleValue;
transformCount(prevCount, value);
}
count = value;
}
}
@ -118,7 +120,7 @@ namespace osu.Game.Graphics.UserInterface
{
TextAwesome star = new TextAwesome
{
Icon = FontAwesome.star,
Icon = FontAwesome.fa_star,
Anchor = Anchor.CentreLeft,
Origin = Anchor.Centre,
TextSize = StarSize,
@ -149,7 +151,7 @@ namespace osu.Game.Graphics.UserInterface
public void StopAnimation()
{
prevCount = count;
transformStartTime = Time;
transformStartTime = Time.Current;
for (int i = 0; i < MaxStars; i++)
transformStarQuick(i, count);
@ -188,7 +190,7 @@ namespace osu.Game.Graphics.UserInterface
transformStar(i, newValue);
stars[i].DelayReset();
}
transformStartTime = Time;
transformStartTime = Time.Current;
}
}
}

View File

@ -67,21 +67,12 @@ namespace osu.Game.Graphics.UserInterface.Volume
base.Dispose(isDisposing);
}
protected override bool OnWheelDown(InputState state)
protected override bool OnWheel(InputState state)
{
if (!IsVisible)
return false;
volumeMeterMaster.TriggerWheelDown(state);
return true;
}
protected override bool OnWheelUp(InputState state)
{
if (!IsVisible)
return false;
volumeMeterMaster.TriggerWheelUp(state);
volumeMeterMaster.TriggerWheel(state);
return true;
}

View File

@ -14,13 +14,7 @@ namespace osu.Game.Graphics.UserInterface.Volume
{
public Action ActivateRequested;
protected override bool OnWheelDown(InputState state)
{
ActivateRequested?.Invoke();
return true;
}
protected override bool OnWheelUp(InputState state)
protected override bool OnWheel(InputState state)
{
ActivateRequested?.Invoke();
return true;

View File

@ -57,9 +57,9 @@ namespace osu.Game.Graphics.UserInterface.Volume
};
}
protected override void Load(BaseGame game)
protected override void LoadComplete()
{
base.Load(game);
base.LoadComplete();
updateFill();
}
@ -73,15 +73,9 @@ namespace osu.Game.Graphics.UserInterface.Volume
}
}
protected override bool OnWheelUp(InputState state)
protected override bool OnWheel(InputState state)
{
Volume += 0.05f;
return true;
}
protected override bool OnWheelDown(InputState state)
{
Volume -= 0.05f;
Volume += 0.05f * state.Mouse.WheelDiff;
return true;
}

View File

@ -101,11 +101,13 @@ namespace osu.Game.Overlays
protected override void PopIn()
{
MoveToX(0, 300, EasingTypes.Out);
FadeTo(1, 300);
}
protected override void PopOut()
{
MoveToX(-width, 300, EasingTypes.Out);
FadeTo(0, 300);
}
}
}

View File

@ -59,14 +59,14 @@ namespace osu.Game.Overlays
{
new ToolbarButton
{
Icon = FontAwesome.gear,
Icon = FontAwesome.fa_gear,
TooltipMain = "Settings",
TooltipSub = "Change your settings",
Action = () => OnSettings?.Invoke()
},
new ToolbarButton
{
Icon = FontAwesome.home,
Icon = FontAwesome.fa_home,
TooltipMain = "Home",
TooltipSub = "Return to the main menu",
Action = () => OnHome?.Invoke()
@ -93,15 +93,15 @@ namespace osu.Game.Overlays
},
new ToolbarButton
{
Icon = FontAwesome.search
Icon = FontAwesome.fa_search
},
userButton = new ToolbarButton
{
Icon = FontAwesome.user,
Icon = FontAwesome.fa_user,
},
new ToolbarButton
{
Icon = FontAwesome.bars
Icon = FontAwesome.fa_bars
},
}
}