Update framework

This commit is contained in:
Thomas Müller
2017-07-11 16:58:06 +03:00
committed by Dean Herbert
parent 39d20565aa
commit 9d523ea012
29 changed files with 54 additions and 59 deletions

View File

@ -114,8 +114,8 @@ namespace osu.Game.Screens.Menu
buttonsTopLevel.Add(new Button(@"osu!direct", string.Empty, FontAwesome.fa_osu_chevron_down_o, new Color4(165, 204, 0, 255), () => OnDirect?.Invoke(), 0, Key.D));
buttonsTopLevel.Add(new Button(@"exit", string.Empty, FontAwesome.fa_osu_cross_o, new Color4(238, 51, 153, 255), onExit, 0, Key.Q));
buttonFlow.Add(buttonsPlay);
buttonFlow.Add(buttonsTopLevel);
buttonFlow.AddRange(buttonsPlay);
buttonFlow.AddRange(buttonsTopLevel);
}
[BackgroundDependencyLoader(true)]

View File

@ -20,15 +20,15 @@ namespace osu.Game.Screens.Play
private SpriteText countSpriteText;
public bool IsCounting { get; set; }
private int count;
public int Count
private int countPresses;
public int CountPresses
{
get { return count; }
get { return countPresses; }
private set
{
if (count != value)
if (countPresses != value)
{
count = value;
countPresses = value;
countSpriteText.Text = value.ToString(@"#,0");
}
}
@ -45,7 +45,7 @@ namespace osu.Game.Screens.Play
isLit = value;
updateGlowSprite(value);
if (value && IsCounting)
Count++;
CountPresses++;
}
}
}
@ -98,7 +98,7 @@ namespace osu.Game.Screens.Play
},
countSpriteText = new OsuSpriteText
{
Text = Count.ToString(@"#,0"),
Text = CountPresses.ToString(@"#,0"),
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
RelativePositionAxes = Axes.Both,
@ -128,6 +128,6 @@ namespace osu.Game.Screens.Play
}
}
public void ResetCount() => Count = 0;
public void ResetCount() => CountPresses = 0;
}
}

View File

@ -200,7 +200,7 @@ namespace osu.Game.Screens.Play
scoreProcessor = HitRenderer.CreateScoreProcessor();
hudOverlay.KeyCounter.Add(rulesetInstance.CreateGameplayKeys());
hudOverlay.KeyCounter.AddRange(rulesetInstance.CreateGameplayKeys());
hudOverlay.BindProcessor(scoreProcessor);
hudOverlay.BindHitRenderer(HitRenderer);

View File

@ -40,7 +40,7 @@ namespace osu.Game.Screens.Ranking
[BackgroundDependencyLoader]
private void load(OsuColour colours)
{
AddInternal(new Drawable[]
AddRangeInternal(new Drawable[]
{
fill = new Box
{

View File

@ -12,7 +12,6 @@ using osu.Game.Beatmaps.Drawables;
using osu.Game.Configuration;
using osu.Framework.Input;
using OpenTK.Input;
using System.Collections;
using osu.Framework.MathUtils;
using System.Diagnostics;
using System.Threading.Tasks;
@ -22,7 +21,7 @@ using osu.Framework.Configuration;
namespace osu.Game.Screens.Select
{
internal class BeatmapCarousel : ScrollContainer, IEnumerable<BeatmapGroup>
internal class BeatmapCarousel : ScrollContainer
{
public BeatmapInfo SelectedBeatmap => selectedPanel?.Beatmap;
@ -265,10 +264,6 @@ namespace osu.Game.Screens.Select
perform();
}
public IEnumerator<BeatmapGroup> GetEnumerator() => groups.GetEnumerator();
IEnumerator IEnumerable.GetEnumerator() => GetEnumerator();
private BeatmapGroup createGroup(BeatmapSetInfo beatmapSet)
{
foreach (var b in beatmapSet.Beatmaps)
@ -307,7 +302,7 @@ namespace osu.Game.Screens.Select
panels.Remove(p);
scrollableContent.Remove(group.Header);
scrollableContent.Remove(group.BeatmapPanels);
scrollableContent.RemoveRange(group.BeatmapPanels);
if (selectedGroup == group)
SelectNext();

View File

@ -33,7 +33,7 @@ namespace osu.Game.Screens.Select
public BeatmapDetailArea()
{
AddInternal(new Drawable[]
AddRangeInternal(new Drawable[]
{
new BeatmapDetailAreaTabControl
{
@ -61,7 +61,7 @@ namespace osu.Game.Screens.Select
},
});
Add(new Drawable[]
AddRange(new Drawable[]
{
Details = new BeatmapDetails
{