Merge branch 'master' of git://github.com/ppy/osu into supporter-disclaimer

This commit is contained in:
jorolf
2019-02-25 23:49:01 +01:00
444 changed files with 4714 additions and 2852 deletions

View File

@ -118,7 +118,6 @@ namespace osu.Game.Screens.Menu
AllowMultiline = false,
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
TextSize = 16,
Position = new Vector2(0, 35),
Text = text
}

View File

@ -8,7 +8,7 @@ using osu.Framework;
using osu.Framework.Allocation;
using osu.Framework.Audio;
using osu.Framework.Audio.Sample;
using osu.Framework.Configuration;
using osu.Framework.Bindables;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Input.Bindings;
@ -117,7 +117,7 @@ namespace osu.Game.Screens.Menu
[BackgroundDependencyLoader(true)]
private void load(AudioManager audio, IdleTracker idleTracker)
{
isIdle.ValueChanged += updateIdleState;
isIdle.ValueChanged += idle => updateIdleState(idle.NewValue);
if (idleTracker != null) isIdle.BindTo(idleTracker.IsIdle);

View File

@ -65,25 +65,13 @@ namespace osu.Game.Screens.Menu
}
};
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.AddText("This is an ", t => t.Font = t.Font.With(Typeface.Exo, 30, FontWeight.Light));
textFlow.AddText("early development build", t => t.Font = t.Font.With(Typeface.Exo, 30, FontWeight.SemiBold));
textFlow.AddParagraph("Things may not work as expected", t => t.TextSize = 20);
textFlow.AddParagraph("Things may not work as expected", t => t.Font = t.Font.With(size: 20));
textFlow.NewParagraph();
Action<SpriteText> format = t =>
{
t.TextSize = 15;
t.Font = @"Exo2.0-SemiBold";
};
Action<SpriteText> format = t => t.Font = OsuFont.GetFont(size: 15, weight: FontWeight.Bold);
textFlow.AddParagraph("Detailed bug reports are welcomed via github issues.", format);
textFlow.NewParagraph();
@ -103,7 +91,7 @@ namespace osu.Game.Screens.Menu
supporterDrawables.Add(heart = textFlow.AddIcon(FontAwesome.fa_heart, t =>
{
t.Padding = new MarginPadding { Left = 5 };
t.TextSize = 12;
t.Font = t.Font.With(size: 12);
t.Colour = colours.Pink;
t.Origin = Anchor.Centre;
}).First());

View File

@ -5,7 +5,7 @@ using osu.Framework.Allocation;
using osu.Framework.Audio;
using osu.Framework.Audio.Sample;
using osu.Framework.Audio.Track;
using osu.Framework.Configuration;
using osu.Framework.Bindables;
using osu.Framework.Screens;
using osu.Framework.Graphics;
using osu.Framework.MathUtils;
@ -28,8 +28,6 @@ namespace osu.Game.Screens.Menu
/// </summary>
public bool DidLoadMenu;
private readonly Bindable<WorkingBeatmap> beatmap = new Bindable<WorkingBeatmap>();
private MainMenu mainMenu;
private SampleChannel welcome;
private SampleChannel seeya;
@ -47,16 +45,14 @@ namespace osu.Game.Screens.Menu
private WorkingBeatmap introBeatmap;
[BackgroundDependencyLoader]
private void load(AudioManager audio, OsuConfigManager config, BeatmapManager beatmaps, Framework.Game game, BindableBeatmap beatmap)
private void load(AudioManager audio, OsuConfigManager config, BeatmapManager beatmaps, Framework.Game game)
{
this.beatmap.BindTo(beatmap);
menuVoice = config.GetBindable<bool>(OsuSetting.MenuVoice);
menuMusic = config.GetBindable<bool>(OsuSetting.MenuMusic);
BeatmapSetInfo setInfo = null;
if (!menuMusic)
if (!menuMusic.Value)
{
var sets = beatmaps.GetAllUsableBeatmapSets();
if (sets.Count > 0)
@ -95,15 +91,15 @@ namespace osu.Game.Screens.Menu
if (!resuming)
{
beatmap.Value = introBeatmap;
Beatmap.Value = introBeatmap;
if (menuVoice)
if (menuVoice.Value)
welcome.Play();
Scheduler.AddDelayed(delegate
{
// Only start the current track if it is the menu music. A beatmap's track is started when entering the Main Manu.
if (menuMusic)
if (menuMusic.Value)
track.Start();
LoadComponentAsync(mainMenu = new MainMenu());
@ -116,7 +112,6 @@ namespace osu.Game.Screens.Menu
}, delay_step_two);
}
logo.RelativePositionAxes = Axes.Both;
logo.Colour = Color4.White;
logo.Ripple = false;
@ -163,7 +158,7 @@ namespace osu.Game.Screens.Menu
double fadeOutTime = EXIT_DELAY;
//we also handle the exit transition.
if (menuVoice)
if (menuVoice.Value)
seeya.Play();
else
fadeOutTime = 500;

View File

@ -102,9 +102,8 @@ namespace osu.Game.Screens.Menu
Origin = Anchor.Centre,
Text = "welcome",
Padding = new MarginPadding { Bottom = 10 },
Font = @"Exo2.0-Light",
Font = OsuFont.GetFont(weight: FontWeight.Light, size: 42),
Alpha = 0,
TextSize = 42,
Spacing = new Vector2(5),
},
new CircularContainer

View File

@ -3,7 +3,6 @@
using osuTK;
using osuTK.Graphics;
using osu.Framework.Configuration;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Batches;
using osu.Framework.Graphics.Colour;
@ -15,6 +14,7 @@ using osu.Game.Beatmaps;
using osu.Game.Graphics;
using System;
using osu.Framework.Allocation;
using osu.Framework.Bindables;
namespace osu.Game.Screens.Menu
{
@ -74,7 +74,7 @@ namespace osu.Game.Screens.Menu
}
[BackgroundDependencyLoader]
private void load(ShaderManager shaders, IBindableBeatmap beatmap)
private void load(ShaderManager shaders, IBindable<WorkingBeatmap> beatmap)
{
this.beatmap.BindTo(beatmap);
shader = shaders.Load(VertexShaderDescriptor.TEXTURE_2, FragmentShaderDescriptor.TEXTURE_ROUNDED);

View File

@ -5,6 +5,7 @@ using osuTK;
using osuTK.Graphics;
using osuTK.Input;
using osu.Framework.Allocation;
using osu.Framework.Bindables;
using osu.Framework.Graphics;
using osu.Framework.Input.Events;
using osu.Framework.Screens;
@ -53,10 +54,10 @@ namespace osu.Game.Screens.Menu
buttons = new ButtonSystem
{
OnChart = delegate { this.Push(new ChartListing()); },
OnDirect = delegate {this.Push(new OnlineListing()); },
OnEdit = delegate {this.Push(new Editor()); },
OnDirect = delegate { this.Push(new OnlineListing()); },
OnEdit = delegate { this.Push(new Editor()); },
OnSolo = onSolo,
OnMulti = delegate {this.Push(new Multiplayer()); },
OnMulti = delegate { this.Push(new Multiplayer()); },
OnExit = this.Exit,
}
}
@ -99,7 +100,7 @@ namespace osu.Game.Screens.Menu
public void LoadToSolo() => Schedule(onSolo);
private void onSolo() =>this.Push(consumeSongSelect());
private void onSolo() => this.Push(consumeSongSelect());
private Screen consumeSongSelect()
{
@ -157,7 +158,7 @@ namespace osu.Game.Screens.Menu
.OnComplete(l => buttons.SetOsuLogo(null));
}
private void beatmap_ValueChanged(WorkingBeatmap newValue)
private void beatmap_ValueChanged(ValueChangedEvent<WorkingBeatmap> e)
{
if (!this.IsCurrentScreen())
return;
@ -183,7 +184,7 @@ namespace osu.Game.Screens.Menu
{
base.OnResuming(last);
((BackgroundScreenDefault)Background).Next();
(Background as BackgroundScreenDefault)?.Next();
//we may have consumed our preloaded instance, so let's make another.
preloadSongSelect();
@ -200,7 +201,7 @@ namespace osu.Game.Screens.Menu
{
if (!e.Repeat && e.ControlPressed && e.ShiftPressed && e.Key == Key.D)
{
this.Push(new Drawings());
this.Push(new Drawings());
return true;
}

View File

@ -4,7 +4,6 @@
using osuTK.Graphics;
using osu.Framework.Allocation;
using osu.Framework.Audio.Track;
using osu.Framework.Configuration;
using osu.Framework.Extensions.Color4Extensions;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Colour;
@ -14,6 +13,7 @@ using osu.Game.Beatmaps.ControlPoints;
using osu.Game.Graphics;
using osu.Game.Graphics.Containers;
using System;
using osu.Framework.Bindables;
namespace osu.Game.Screens.Menu
{
@ -42,7 +42,7 @@ namespace osu.Game.Screens.Menu
}
[BackgroundDependencyLoader]
private void load(IBindableBeatmap beatmap, OsuColour colours)
private void load(IBindable<WorkingBeatmap> beatmap, OsuColour colours)
{
this.beatmap.BindTo(beatmap);