mirror of
https://github.com/ppy/osu.git
synced 2025-01-27 19:23:21 +08:00
Merge branch 'master' into stateful-drawables
Conflicts: osu.Game/GameModes/Menu/Intro.cs
This commit is contained in:
commit
25de055802
@ -1 +1 @@
|
|||||||
Subproject commit 6b884e1b80444c5249754634a4b5529c50b52934
|
Subproject commit 1f770847b245e6d250e63e60c24e9e84131d15e7
|
@ -19,17 +19,22 @@ namespace osu.Desktop.Tests
|
|||||||
{
|
{
|
||||||
base.Reset();
|
base.Reset();
|
||||||
|
|
||||||
KeyCounterCollection kc = new KeyCounterCollection
|
Children = new[]
|
||||||
{
|
{
|
||||||
Origin = Anchor.Centre,
|
new KeyCounterCollection
|
||||||
Anchor = Anchor.Centre,
|
{
|
||||||
IsCounting = true
|
Origin = Anchor.Centre,
|
||||||
|
Anchor = Anchor.Centre,
|
||||||
|
IsCounting = true,
|
||||||
|
Counters = new KeyCounter[]
|
||||||
|
{
|
||||||
|
new KeyCounterKeyboard(@"Z", Key.Z),
|
||||||
|
new KeyCounterKeyboard(@"X", Key.X),
|
||||||
|
new KeyCounterMouse(@"M1", MouseButton.Left),
|
||||||
|
new KeyCounterMouse(@"M2", MouseButton.Right),
|
||||||
|
},
|
||||||
|
},
|
||||||
};
|
};
|
||||||
Add(kc);
|
|
||||||
kc.AddKey(new KeyCounterKeyboard(@"Z", Key.Z));
|
|
||||||
kc.AddKey(new KeyCounterKeyboard(@"X", Key.X));
|
|
||||||
kc.AddKey(new KeyCounterMouse(@"M1", MouseButton.Left));
|
|
||||||
kc.AddKey(new KeyCounterMouse(@"M2", MouseButton.Right));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -106,14 +106,17 @@ namespace osu.Game.GameModes.Menu
|
|||||||
|
|
||||||
buttonFlow.Position = new Vector2(wedge_width * 2 - (button_width + osuLogo.SizeForFlow / 4), 0);
|
buttonFlow.Position = new Vector2(wedge_width * 2 - (button_width + osuLogo.SizeForFlow / 4), 0);
|
||||||
|
|
||||||
buttonsPlay.Add((Button)buttonFlow.Add(new Button(@"solo", @"freeplay", FontAwesome.user, new Color4(102, 68, 204, 255), OnSolo, wedge_width, Key.P)));
|
buttonsPlay.Add(new Button(@"solo", @"freeplay", FontAwesome.user, new Color4(102, 68, 204, 255), OnSolo, wedge_width, Key.P));
|
||||||
buttonsPlay.Add((Button)buttonFlow.Add(new Button(@"multi", @"multiplayer", FontAwesome.users, new Color4(94, 63, 186, 255), OnMulti, 0, Key.M)));
|
buttonsPlay.Add(new Button(@"multi", @"multiplayer", FontAwesome.users, new Color4(94, 63, 186, 255), OnMulti, 0, Key.M));
|
||||||
buttonsPlay.Add((Button)buttonFlow.Add(new Button(@"chart", @"charts", FontAwesome.fa_osu_charts, new Color4(80, 53, 160, 255), OnChart)));
|
buttonsPlay.Add(new Button(@"chart", @"charts", FontAwesome.fa_osu_charts, new Color4(80, 53, 160, 255), OnChart));
|
||||||
|
|
||||||
buttonsTopLevel.Add((Button)buttonFlow.Add(new Button(@"play", @"play", FontAwesome.fa_osu_logo, new Color4(102, 68, 204, 255), onPlay, wedge_width, Key.P)));
|
buttonsTopLevel.Add(new Button(@"play", @"play", FontAwesome.fa_osu_logo, new Color4(102, 68, 204, 255), onPlay, wedge_width, Key.P));
|
||||||
buttonsTopLevel.Add((Button)buttonFlow.Add(new Button(@"osu!editor", @"edit", FontAwesome.fa_osu_edit_o, new Color4(238, 170, 0, 255), OnEdit, 0, Key.E)));
|
buttonsTopLevel.Add(new Button(@"osu!editor", @"edit", FontAwesome.fa_osu_edit_o, new Color4(238, 170, 0, 255), OnEdit, 0, Key.E));
|
||||||
buttonsTopLevel.Add((Button)buttonFlow.Add(new Button(@"osu!direct", @"direct", FontAwesome.fa_osu_chevron_down_o, new Color4(165, 204, 0, 255), OnDirect, 0, Key.D)));
|
buttonsTopLevel.Add(new Button(@"osu!direct", @"direct", FontAwesome.fa_osu_chevron_down_o, new Color4(165, 204, 0, 255), OnDirect, 0, Key.D));
|
||||||
buttonsTopLevel.Add((Button)buttonFlow.Add(new Button(@"exit", @"exit", FontAwesome.fa_osu_cross_o, new Color4(238, 51, 153, 255), onExit, 0, Key.Q)));
|
buttonsTopLevel.Add(new Button(@"exit", @"exit", FontAwesome.fa_osu_cross_o, new Color4(238, 51, 153, 255), onExit, 0, Key.Q));
|
||||||
|
|
||||||
|
buttonFlow.Add(buttonsPlay);
|
||||||
|
buttonFlow.Add(buttonsTopLevel);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override bool OnKeyDown(InputState state, KeyDownEventArgs args)
|
protected override bool OnKeyDown(InputState state, KeyDownEventArgs args)
|
||||||
|
@ -44,18 +44,18 @@ namespace osu.Game.GameModes.Menu
|
|||||||
AudioTrack bgm = Game.Audio.Track.Get(@"circles");
|
AudioTrack bgm = Game.Audio.Track.Get(@"circles");
|
||||||
bgm.Looping = true;
|
bgm.Looping = true;
|
||||||
|
|
||||||
Game.Scheduler.Add(delegate
|
Scheduler.Add(delegate
|
||||||
{
|
{
|
||||||
welcome.Play();
|
welcome.Play();
|
||||||
}, true);
|
}, true);
|
||||||
|
|
||||||
|
|
||||||
Game.Scheduler.AddDelayed(delegate
|
Scheduler.AddDelayed(delegate
|
||||||
{
|
{
|
||||||
bgm.Start();
|
bgm.Start();
|
||||||
}, 600);
|
}, 600);
|
||||||
|
|
||||||
Game.Scheduler.AddDelayed(delegate
|
Scheduler.AddDelayed(delegate
|
||||||
{
|
{
|
||||||
DidLoadMenu = true;
|
DidLoadMenu = true;
|
||||||
Push(new MainMenu());
|
Push(new MainMenu());
|
||||||
@ -82,7 +82,7 @@ namespace osu.Game.GameModes.Menu
|
|||||||
protected override void OnResuming(GameMode last)
|
protected override void OnResuming(GameMode last)
|
||||||
{
|
{
|
||||||
//we are just an intro. if we are resumed, we just want to exit after a short delay (to allow the last mode to transition out).
|
//we are just an intro. if we are resumed, we just want to exit after a short delay (to allow the last mode to transition out).
|
||||||
Game.Scheduler.AddDelayed(Exit, 600);
|
Scheduler.AddDelayed(Exit, 600);
|
||||||
|
|
||||||
base.OnResuming(last);
|
base.OnResuming(last);
|
||||||
}
|
}
|
||||||
|
@ -45,7 +45,7 @@ namespace osu.Game.GameModes.Menu
|
|||||||
OnSolo = delegate { Push(new PlaySongSelect()); },
|
OnSolo = delegate { Push(new PlaySongSelect()); },
|
||||||
OnMulti = delegate { Push(new Lobby()); },
|
OnMulti = delegate { Push(new Lobby()); },
|
||||||
OnTest = delegate { Push(new TestBrowser()); },
|
OnTest = delegate { Push(new TestBrowser()); },
|
||||||
OnExit = delegate { Game.Scheduler.AddDelayed(Exit, ButtonSystem.EXIT_DELAY); },
|
OnExit = delegate { Scheduler.AddDelayed(Exit, ButtonSystem.EXIT_DELAY); },
|
||||||
OnSettings = delegate {
|
OnSettings = delegate {
|
||||||
osu.Options.PoppedOut = !osu.Options.PoppedOut;
|
osu.Options.PoppedOut = !osu.Options.PoppedOut;
|
||||||
},
|
},
|
||||||
|
@ -41,7 +41,7 @@ namespace osu.Game.GameModes
|
|||||||
}
|
}
|
||||||
else if (bg != null)
|
else if (bg != null)
|
||||||
{
|
{
|
||||||
AddTopLevel(new ParallaxContainer
|
AddInternal(new ParallaxContainer
|
||||||
{
|
{
|
||||||
Depth = float.MinValue,
|
Depth = float.MinValue,
|
||||||
Children = new[]
|
Children = new[]
|
||||||
@ -51,7 +51,6 @@ namespace osu.Game.GameModes
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
base.OnEntering(last);
|
base.OnEntering(last);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -14,21 +14,21 @@ namespace osu.Game.Graphics.Containers
|
|||||||
public ParallaxContainer()
|
public ParallaxContainer()
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both;
|
RelativeSizeAxes = Axes.Both;
|
||||||
|
AddInternal(content = new Container()
|
||||||
|
{
|
||||||
|
RelativeSizeAxes = Axes.Both,
|
||||||
|
Anchor = Anchor.Centre,
|
||||||
|
Origin = Anchor.Centre
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
private Container content = new Container()
|
private Container content;
|
||||||
{
|
|
||||||
RelativeSizeAxes = Axes.Both,
|
|
||||||
Anchor = Anchor.Centre,
|
|
||||||
Origin = Anchor.Centre
|
|
||||||
};
|
|
||||||
|
|
||||||
protected override Container AddTarget => content;
|
protected override Container Content => content;
|
||||||
|
|
||||||
public override void Load()
|
public override void Load()
|
||||||
{
|
{
|
||||||
base.Load();
|
base.Load();
|
||||||
Add(content);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override bool OnMouseMove(InputState state)
|
protected override bool OnMouseMove(InputState state)
|
||||||
|
@ -22,18 +22,19 @@ namespace osu.Game.Graphics.UserInterface
|
|||||||
set
|
set
|
||||||
{
|
{
|
||||||
foreach (var k in value)
|
foreach (var k in value)
|
||||||
AddKey(k);
|
addKey(k);
|
||||||
|
|
||||||
|
Children = value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void AddKey(KeyCounter key)
|
private void addKey(KeyCounter key)
|
||||||
{
|
{
|
||||||
counters.Add(key);
|
counters.Add(key);
|
||||||
key.IsCounting = this.IsCounting;
|
key.IsCounting = IsCounting;
|
||||||
key.FadeTime = this.FadeTime;
|
key.FadeTime = FadeTime;
|
||||||
key.KeyDownTextColor = this.KeyDownTextColor;
|
key.KeyDownTextColor = KeyDownTextColor;
|
||||||
key.KeyUpTextColor = this.KeyUpTextColor;
|
key.KeyUpTextColor = KeyUpTextColor;
|
||||||
base.Add(key);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void ResetCount()
|
public void ResetCount()
|
||||||
|
@ -21,7 +21,7 @@ namespace osu.Game
|
|||||||
public Options Options;
|
public Options Options;
|
||||||
public APIAccess API;
|
public APIAccess API;
|
||||||
|
|
||||||
protected override Container AddTarget => ratioContainer?.IsLoaded == true ? ratioContainer : base.AddTarget;
|
protected override Container Content => ratioContainer?.IsLoaded == true ? ratioContainer : base.Content;
|
||||||
|
|
||||||
private RatioAdjust ratioContainer;
|
private RatioAdjust ratioContainer;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user