mirror of
https://github.com/ppy/osu.git
synced 2024-12-13 08:32:57 +08:00
Fix most open compound words in identifiers being closed
This commit is contained in:
parent
98524d60a4
commit
7de43e3aba
@ -72,7 +72,7 @@ namespace osu.Game.Rulesets.Catch.Tests
|
|||||||
}
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
public void TestJuicestream()
|
public void TestJuiceStream()
|
||||||
{
|
{
|
||||||
AddStep("hit juicestream", () => spawnJuiceStream(true));
|
AddStep("hit juicestream", () => spawnJuiceStream(true));
|
||||||
AddUntilStep("wait for completion", () => playfieldIsEmpty);
|
AddUntilStep("wait for completion", () => playfieldIsEmpty);
|
||||||
|
@ -37,20 +37,20 @@ namespace osu.Game.Rulesets.Catch.Tests
|
|||||||
AddStep("show hyperdash droplet", () => SetContents(_ => createDrawableDroplet(true)));
|
AddStep("show hyperdash droplet", () => SetContents(_ => createDrawableDroplet(true)));
|
||||||
}
|
}
|
||||||
|
|
||||||
private Drawable createDrawableFruit(int indexInBeatmap, bool hyperdash = false) =>
|
private Drawable createDrawableFruit(int indexInBeatmap, bool hyperDash = false) =>
|
||||||
new TestDrawableCatchHitObjectSpecimen(new DrawableFruit(new Fruit
|
new TestDrawableCatchHitObjectSpecimen(new DrawableFruit(new Fruit
|
||||||
{
|
{
|
||||||
IndexInBeatmap = indexInBeatmap,
|
IndexInBeatmap = indexInBeatmap,
|
||||||
HyperDashBindable = { Value = hyperdash }
|
HyperDashBindable = { Value = hyperDash }
|
||||||
}));
|
}));
|
||||||
|
|
||||||
private Drawable createDrawableBanana() =>
|
private Drawable createDrawableBanana() =>
|
||||||
new TestDrawableCatchHitObjectSpecimen(new DrawableBanana(new Banana()));
|
new TestDrawableCatchHitObjectSpecimen(new DrawableBanana(new Banana()));
|
||||||
|
|
||||||
private Drawable createDrawableDroplet(bool hyperdash = false) =>
|
private Drawable createDrawableDroplet(bool hyperDash = false) =>
|
||||||
new TestDrawableCatchHitObjectSpecimen(new DrawableDroplet(new Droplet
|
new TestDrawableCatchHitObjectSpecimen(new DrawableDroplet(new Droplet
|
||||||
{
|
{
|
||||||
HyperDashBindable = { Value = hyperdash }
|
HyperDashBindable = { Value = hyperDash }
|
||||||
}));
|
}));
|
||||||
|
|
||||||
private Drawable createDrawableTinyDroplet() => new TestDrawableCatchHitObjectSpecimen(new DrawableTinyDroplet(new TinyDroplet()));
|
private Drawable createDrawableTinyDroplet() => new TestDrawableCatchHitObjectSpecimen(new DrawableTinyDroplet(new TinyDroplet()));
|
||||||
|
@ -24,13 +24,13 @@ namespace osu.Game.Rulesets.Mania.Tests.Skinning
|
|||||||
|
|
||||||
public TestSceneHitExplosion()
|
public TestSceneHitExplosion()
|
||||||
{
|
{
|
||||||
int runcount = 0;
|
int runCount = 0;
|
||||||
|
|
||||||
AddRepeatStep("explode", () =>
|
AddRepeatStep("explode", () =>
|
||||||
{
|
{
|
||||||
runcount++;
|
runCount++;
|
||||||
|
|
||||||
if (runcount % 15 > 12)
|
if (runCount % 15 > 12)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
int poolIndex = 0;
|
int poolIndex = 0;
|
||||||
@ -39,7 +39,7 @@ namespace osu.Game.Rulesets.Mania.Tests.Skinning
|
|||||||
{
|
{
|
||||||
c.Add(hitExplosionPools[poolIndex].Get(e =>
|
c.Add(hitExplosionPools[poolIndex].Get(e =>
|
||||||
{
|
{
|
||||||
e.Apply(new JudgementResult(new HitObject(), runcount % 6 == 0 ? new HoldNoteTickJudgement() : new ManiaJudgement()));
|
e.Apply(new JudgementResult(new HitObject(), runCount % 6 == 0 ? new HoldNoteTickJudgement() : new ManiaJudgement()));
|
||||||
|
|
||||||
e.Anchor = Anchor.Centre;
|
e.Anchor = Anchor.Centre;
|
||||||
e.Origin = Anchor.Centre;
|
e.Origin = Anchor.Centre;
|
||||||
|
@ -40,7 +40,7 @@ namespace osu.Game.Rulesets.Mania.Beatmaps
|
|||||||
public override IEnumerable<BeatmapStatistic> GetStatistics()
|
public override IEnumerable<BeatmapStatistic> GetStatistics()
|
||||||
{
|
{
|
||||||
int notes = HitObjects.Count(s => s is Note);
|
int notes = HitObjects.Count(s => s is Note);
|
||||||
int holdnotes = HitObjects.Count(s => s is HoldNote);
|
int holdNotes = HitObjects.Count(s => s is HoldNote);
|
||||||
|
|
||||||
return new[]
|
return new[]
|
||||||
{
|
{
|
||||||
@ -54,7 +54,7 @@ namespace osu.Game.Rulesets.Mania.Beatmaps
|
|||||||
{
|
{
|
||||||
Name = @"Hold Note Count",
|
Name = @"Hold Note Count",
|
||||||
CreateIcon = () => new BeatmapStatisticIcon(BeatmapStatisticsIconType.Sliders),
|
CreateIcon = () => new BeatmapStatisticIcon(BeatmapStatisticsIconType.Sliders),
|
||||||
Content = holdnotes.ToString(),
|
Content = holdNotes.ToString(),
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -24,7 +24,7 @@ namespace osu.Game.Rulesets.Mania.Skinning.Legacy
|
|||||||
/// Mapping of <see cref="HitResult"/> to their corresponding
|
/// Mapping of <see cref="HitResult"/> to their corresponding
|
||||||
/// <see cref="LegacyManiaSkinConfigurationLookups"/> value.
|
/// <see cref="LegacyManiaSkinConfigurationLookups"/> value.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private static readonly IReadOnlyDictionary<HitResult, LegacyManiaSkinConfigurationLookups> hitresult_mapping
|
private static readonly IReadOnlyDictionary<HitResult, LegacyManiaSkinConfigurationLookups> hit_result_mapping
|
||||||
= new Dictionary<HitResult, LegacyManiaSkinConfigurationLookups>
|
= new Dictionary<HitResult, LegacyManiaSkinConfigurationLookups>
|
||||||
{
|
{
|
||||||
{ HitResult.Perfect, LegacyManiaSkinConfigurationLookups.Hit300g },
|
{ HitResult.Perfect, LegacyManiaSkinConfigurationLookups.Hit300g },
|
||||||
@ -39,7 +39,7 @@ namespace osu.Game.Rulesets.Mania.Skinning.Legacy
|
|||||||
/// Mapping of <see cref="HitResult"/> to their corresponding
|
/// Mapping of <see cref="HitResult"/> to their corresponding
|
||||||
/// default filenames.
|
/// default filenames.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private static readonly IReadOnlyDictionary<HitResult, string> default_hitresult_skin_filenames
|
private static readonly IReadOnlyDictionary<HitResult, string> default_hit_result_skin_filenames
|
||||||
= new Dictionary<HitResult, string>
|
= new Dictionary<HitResult, string>
|
||||||
{
|
{
|
||||||
{ HitResult.Perfect, "mania-hit300g" },
|
{ HitResult.Perfect, "mania-hit300g" },
|
||||||
@ -126,11 +126,11 @@ namespace osu.Game.Rulesets.Mania.Skinning.Legacy
|
|||||||
|
|
||||||
private Drawable getResult(HitResult result)
|
private Drawable getResult(HitResult result)
|
||||||
{
|
{
|
||||||
if (!hitresult_mapping.ContainsKey(result))
|
if (!hit_result_mapping.ContainsKey(result))
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
string filename = this.GetManiaSkinConfig<string>(hitresult_mapping[result])?.Value
|
string filename = this.GetManiaSkinConfig<string>(hit_result_mapping[result])?.Value
|
||||||
?? default_hitresult_skin_filenames[result];
|
?? default_hit_result_skin_filenames[result];
|
||||||
|
|
||||||
var animation = this.GetAnimation(filename, true, true);
|
var animation = this.GetAnimation(filename, true, true);
|
||||||
return animation == null ? null : new LegacyManiaJudgementPiece(result, animation);
|
return animation == null ? null : new LegacyManiaJudgementPiece(result, animation);
|
||||||
|
@ -65,7 +65,7 @@ namespace osu.Game.Rulesets.Mania.UI
|
|||||||
|
|
||||||
public override bool Remove(DrawableHitObject h) => getStageByColumn(((ManiaHitObject)h.HitObject).Column).Remove(h);
|
public override bool Remove(DrawableHitObject h) => getStageByColumn(((ManiaHitObject)h.HitObject).Column).Remove(h);
|
||||||
|
|
||||||
public void Add(BarLine barline) => stages.ForEach(s => s.Add(barline));
|
public void Add(BarLine barLine) => stages.ForEach(s => s.Add(barLine));
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Retrieves a column from a screen-space position.
|
/// Retrieves a column from a screen-space position.
|
||||||
|
@ -147,7 +147,7 @@ namespace osu.Game.Rulesets.Mania.UI
|
|||||||
|
|
||||||
public override bool Remove(DrawableHitObject h) => Columns.ElementAt(((ManiaHitObject)h.HitObject).Column - firstColumnIndex).Remove(h);
|
public override bool Remove(DrawableHitObject h) => Columns.ElementAt(((ManiaHitObject)h.HitObject).Column - firstColumnIndex).Remove(h);
|
||||||
|
|
||||||
public void Add(BarLine barline) => base.Add(new DrawableBarLine(barline));
|
public void Add(BarLine barLine) => base.Add(new DrawableBarLine(barLine));
|
||||||
|
|
||||||
internal void OnNewResult(DrawableHitObject judgedObject, JudgementResult result)
|
internal void OnNewResult(DrawableHitObject judgedObject, JudgementResult result)
|
||||||
{
|
{
|
||||||
|
@ -250,7 +250,7 @@ namespace osu.Game.Rulesets.Osu.Edit.Blueprints.Sliders.Components
|
|||||||
switch (pathType)
|
switch (pathType)
|
||||||
{
|
{
|
||||||
case PathType.Catmull:
|
case PathType.Catmull:
|
||||||
return colours.Seafoam;
|
return colours.SeaFoam;
|
||||||
|
|
||||||
case PathType.Bezier:
|
case PathType.Bezier:
|
||||||
return colours.Pink;
|
return colours.Pink;
|
||||||
|
@ -16,7 +16,7 @@ namespace osu.Game.Rulesets.Osu.Mods
|
|||||||
{
|
{
|
||||||
public override string Name => "Spun Out";
|
public override string Name => "Spun Out";
|
||||||
public override string Acronym => "SO";
|
public override string Acronym => "SO";
|
||||||
public override IconUsage? Icon => OsuIcon.ModSpunout;
|
public override IconUsage? Icon => OsuIcon.ModSpunOut;
|
||||||
public override ModType Type => ModType.Automation;
|
public override ModType Type => ModType.Automation;
|
||||||
public override string Description => @"Spinners will be automatically completed.";
|
public override string Description => @"Spinners will be automatically completed.";
|
||||||
public override double ScoreMultiplier => 0.9;
|
public override double ScoreMultiplier => 0.9;
|
||||||
|
@ -83,7 +83,7 @@ namespace osu.Game.Rulesets.Taiko.Tests.Skinning
|
|||||||
|
|
||||||
private BarLine createBarLineAtCurrentTime(bool major = false)
|
private BarLine createBarLineAtCurrentTime(bool major = false)
|
||||||
{
|
{
|
||||||
var barline = new BarLine
|
var barLine = new BarLine
|
||||||
{
|
{
|
||||||
Major = major,
|
Major = major,
|
||||||
StartTime = Time.Current + 2000,
|
StartTime = Time.Current + 2000,
|
||||||
@ -92,9 +92,9 @@ namespace osu.Game.Rulesets.Taiko.Tests.Skinning
|
|||||||
var cpi = new ControlPointInfo();
|
var cpi = new ControlPointInfo();
|
||||||
cpi.Add(0, new TimingControlPoint { BeatLength = 500 });
|
cpi.Add(0, new TimingControlPoint { BeatLength = 500 });
|
||||||
|
|
||||||
barline.ApplyDefaults(cpi, new BeatmapDifficulty());
|
barLine.ApplyDefaults(cpi, new BeatmapDifficulty());
|
||||||
|
|
||||||
return barline;
|
return barLine;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -13,7 +13,7 @@ namespace osu.Game.Rulesets.Taiko.Beatmaps
|
|||||||
public override IEnumerable<BeatmapStatistic> GetStatistics()
|
public override IEnumerable<BeatmapStatistic> GetStatistics()
|
||||||
{
|
{
|
||||||
int hits = HitObjects.Count(s => s is Hit);
|
int hits = HitObjects.Count(s => s is Hit);
|
||||||
int drumrolls = HitObjects.Count(s => s is DrumRoll);
|
int drumRolls = HitObjects.Count(s => s is DrumRoll);
|
||||||
int swells = HitObjects.Count(s => s is Swell);
|
int swells = HitObjects.Count(s => s is Swell);
|
||||||
|
|
||||||
return new[]
|
return new[]
|
||||||
@ -28,7 +28,7 @@ namespace osu.Game.Rulesets.Taiko.Beatmaps
|
|||||||
{
|
{
|
||||||
Name = @"Drumroll Count",
|
Name = @"Drumroll Count",
|
||||||
CreateIcon = () => new BeatmapStatisticIcon(BeatmapStatisticsIconType.Sliders),
|
CreateIcon = () => new BeatmapStatisticIcon(BeatmapStatisticsIconType.Sliders),
|
||||||
Content = drumrolls.ToString(),
|
Content = drumRolls.ToString(),
|
||||||
},
|
},
|
||||||
new BeatmapStatistic
|
new BeatmapStatistic
|
||||||
{
|
{
|
||||||
|
@ -40,80 +40,80 @@ namespace osu.Game.Tests.Editing.Checks
|
|||||||
[Test]
|
[Test]
|
||||||
public void TestNormalControlPointVolume()
|
public void TestNormalControlPointVolume()
|
||||||
{
|
{
|
||||||
var hitcircle = new HitCircle
|
var hitCircle = new HitCircle
|
||||||
{
|
{
|
||||||
StartTime = 0,
|
StartTime = 0,
|
||||||
Samples = new List<HitSampleInfo> { new HitSampleInfo(HitSampleInfo.HIT_NORMAL) }
|
Samples = new List<HitSampleInfo> { new HitSampleInfo(HitSampleInfo.HIT_NORMAL) }
|
||||||
};
|
};
|
||||||
hitcircle.ApplyDefaults(cpi, new BeatmapDifficulty());
|
hitCircle.ApplyDefaults(cpi, new BeatmapDifficulty());
|
||||||
|
|
||||||
assertOk(new List<HitObject> { hitcircle });
|
assertOk(new List<HitObject> { hitCircle });
|
||||||
}
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
public void TestLowControlPointVolume()
|
public void TestLowControlPointVolume()
|
||||||
{
|
{
|
||||||
var hitcircle = new HitCircle
|
var hitCircle = new HitCircle
|
||||||
{
|
{
|
||||||
StartTime = 1000,
|
StartTime = 1000,
|
||||||
Samples = new List<HitSampleInfo> { new HitSampleInfo(HitSampleInfo.HIT_NORMAL) }
|
Samples = new List<HitSampleInfo> { new HitSampleInfo(HitSampleInfo.HIT_NORMAL) }
|
||||||
};
|
};
|
||||||
hitcircle.ApplyDefaults(cpi, new BeatmapDifficulty());
|
hitCircle.ApplyDefaults(cpi, new BeatmapDifficulty());
|
||||||
|
|
||||||
assertLowVolume(new List<HitObject> { hitcircle });
|
assertLowVolume(new List<HitObject> { hitCircle });
|
||||||
}
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
public void TestMutedControlPointVolume()
|
public void TestMutedControlPointVolume()
|
||||||
{
|
{
|
||||||
var hitcircle = new HitCircle
|
var hitCircle = new HitCircle
|
||||||
{
|
{
|
||||||
StartTime = 2000,
|
StartTime = 2000,
|
||||||
Samples = new List<HitSampleInfo> { new HitSampleInfo(HitSampleInfo.HIT_NORMAL) }
|
Samples = new List<HitSampleInfo> { new HitSampleInfo(HitSampleInfo.HIT_NORMAL) }
|
||||||
};
|
};
|
||||||
hitcircle.ApplyDefaults(cpi, new BeatmapDifficulty());
|
hitCircle.ApplyDefaults(cpi, new BeatmapDifficulty());
|
||||||
|
|
||||||
assertMuted(new List<HitObject> { hitcircle });
|
assertMuted(new List<HitObject> { hitCircle });
|
||||||
}
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
public void TestNormalSampleVolume()
|
public void TestNormalSampleVolume()
|
||||||
{
|
{
|
||||||
// The sample volume should take precedence over the control point volume.
|
// The sample volume should take precedence over the control point volume.
|
||||||
var hitcircle = new HitCircle
|
var hitCircle = new HitCircle
|
||||||
{
|
{
|
||||||
StartTime = 2000,
|
StartTime = 2000,
|
||||||
Samples = new List<HitSampleInfo> { new HitSampleInfo(HitSampleInfo.HIT_NORMAL, volume: volume_regular) }
|
Samples = new List<HitSampleInfo> { new HitSampleInfo(HitSampleInfo.HIT_NORMAL, volume: volume_regular) }
|
||||||
};
|
};
|
||||||
hitcircle.ApplyDefaults(cpi, new BeatmapDifficulty());
|
hitCircle.ApplyDefaults(cpi, new BeatmapDifficulty());
|
||||||
|
|
||||||
assertOk(new List<HitObject> { hitcircle });
|
assertOk(new List<HitObject> { hitCircle });
|
||||||
}
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
public void TestLowSampleVolume()
|
public void TestLowSampleVolume()
|
||||||
{
|
{
|
||||||
var hitcircle = new HitCircle
|
var hitCircle = new HitCircle
|
||||||
{
|
{
|
||||||
StartTime = 2000,
|
StartTime = 2000,
|
||||||
Samples = new List<HitSampleInfo> { new HitSampleInfo(HitSampleInfo.HIT_NORMAL, volume: volume_low) }
|
Samples = new List<HitSampleInfo> { new HitSampleInfo(HitSampleInfo.HIT_NORMAL, volume: volume_low) }
|
||||||
};
|
};
|
||||||
hitcircle.ApplyDefaults(cpi, new BeatmapDifficulty());
|
hitCircle.ApplyDefaults(cpi, new BeatmapDifficulty());
|
||||||
|
|
||||||
assertLowVolume(new List<HitObject> { hitcircle });
|
assertLowVolume(new List<HitObject> { hitCircle });
|
||||||
}
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
public void TestMutedSampleVolume()
|
public void TestMutedSampleVolume()
|
||||||
{
|
{
|
||||||
var hitcircle = new HitCircle
|
var hitCircle = new HitCircle
|
||||||
{
|
{
|
||||||
StartTime = 0,
|
StartTime = 0,
|
||||||
Samples = new List<HitSampleInfo> { new HitSampleInfo(HitSampleInfo.HIT_NORMAL, volume: volume_muted) }
|
Samples = new List<HitSampleInfo> { new HitSampleInfo(HitSampleInfo.HIT_NORMAL, volume: volume_muted) }
|
||||||
};
|
};
|
||||||
hitcircle.ApplyDefaults(cpi, new BeatmapDifficulty());
|
hitCircle.ApplyDefaults(cpi, new BeatmapDifficulty());
|
||||||
|
|
||||||
assertMuted(new List<HitObject> { hitcircle });
|
assertMuted(new List<HitObject> { hitCircle });
|
||||||
}
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
|
@ -20,30 +20,30 @@ namespace osu.Game.Tests.Visual.Navigation
|
|||||||
public void TestFromMainMenu()
|
public void TestFromMainMenu()
|
||||||
{
|
{
|
||||||
var firstImport = importBeatmap(1);
|
var firstImport = importBeatmap(1);
|
||||||
var secondimport = importBeatmap(3);
|
var secondImport = importBeatmap(3);
|
||||||
|
|
||||||
presentAndConfirm(firstImport);
|
presentAndConfirm(firstImport);
|
||||||
returnToMenu();
|
returnToMenu();
|
||||||
presentAndConfirm(secondimport);
|
presentAndConfirm(secondImport);
|
||||||
returnToMenu();
|
returnToMenu();
|
||||||
presentSecondDifficultyAndConfirm(firstImport, 1);
|
presentSecondDifficultyAndConfirm(firstImport, 1);
|
||||||
returnToMenu();
|
returnToMenu();
|
||||||
presentSecondDifficultyAndConfirm(secondimport, 3);
|
presentSecondDifficultyAndConfirm(secondImport, 3);
|
||||||
}
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
public void TestFromMainMenuDifferentRuleset()
|
public void TestFromMainMenuDifferentRuleset()
|
||||||
{
|
{
|
||||||
var firstImport = importBeatmap(1);
|
var firstImport = importBeatmap(1);
|
||||||
var secondimport = importBeatmap(3, new ManiaRuleset().RulesetInfo);
|
var secondImport = importBeatmap(3, new ManiaRuleset().RulesetInfo);
|
||||||
|
|
||||||
presentAndConfirm(firstImport);
|
presentAndConfirm(firstImport);
|
||||||
returnToMenu();
|
returnToMenu();
|
||||||
presentAndConfirm(secondimport);
|
presentAndConfirm(secondImport);
|
||||||
returnToMenu();
|
returnToMenu();
|
||||||
presentSecondDifficultyAndConfirm(firstImport, 1);
|
presentSecondDifficultyAndConfirm(firstImport, 1);
|
||||||
returnToMenu();
|
returnToMenu();
|
||||||
presentSecondDifficultyAndConfirm(secondimport, 3);
|
presentSecondDifficultyAndConfirm(secondImport, 3);
|
||||||
}
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
@ -52,17 +52,17 @@ namespace osu.Game.Tests.Visual.Navigation
|
|||||||
var firstImport = importBeatmap(1);
|
var firstImport = importBeatmap(1);
|
||||||
presentAndConfirm(firstImport);
|
presentAndConfirm(firstImport);
|
||||||
|
|
||||||
var secondimport = importBeatmap(3);
|
var secondImport = importBeatmap(3);
|
||||||
presentAndConfirm(secondimport);
|
presentAndConfirm(secondImport);
|
||||||
|
|
||||||
// Test presenting same beatmap more than once
|
// Test presenting same beatmap more than once
|
||||||
presentAndConfirm(secondimport);
|
presentAndConfirm(secondImport);
|
||||||
|
|
||||||
presentSecondDifficultyAndConfirm(firstImport, 1);
|
presentSecondDifficultyAndConfirm(firstImport, 1);
|
||||||
presentSecondDifficultyAndConfirm(secondimport, 3);
|
presentSecondDifficultyAndConfirm(secondImport, 3);
|
||||||
|
|
||||||
// Test presenting same beatmap more than once
|
// Test presenting same beatmap more than once
|
||||||
presentSecondDifficultyAndConfirm(secondimport, 3);
|
presentSecondDifficultyAndConfirm(secondImport, 3);
|
||||||
}
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
@ -71,11 +71,11 @@ namespace osu.Game.Tests.Visual.Navigation
|
|||||||
var firstImport = importBeatmap(1);
|
var firstImport = importBeatmap(1);
|
||||||
presentAndConfirm(firstImport);
|
presentAndConfirm(firstImport);
|
||||||
|
|
||||||
var secondimport = importBeatmap(3, new ManiaRuleset().RulesetInfo);
|
var secondImport = importBeatmap(3, new ManiaRuleset().RulesetInfo);
|
||||||
presentAndConfirm(secondimport);
|
presentAndConfirm(secondImport);
|
||||||
|
|
||||||
presentSecondDifficultyAndConfirm(firstImport, 1);
|
presentSecondDifficultyAndConfirm(firstImport, 1);
|
||||||
presentSecondDifficultyAndConfirm(secondimport, 3);
|
presentSecondDifficultyAndConfirm(secondImport, 3);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void returnToMenu()
|
private void returnToMenu()
|
||||||
|
@ -65,11 +65,11 @@ namespace osu.Game.Tests.Visual.Navigation
|
|||||||
public void TestFromMainMenu([Values] ScorePresentType type)
|
public void TestFromMainMenu([Values] ScorePresentType type)
|
||||||
{
|
{
|
||||||
var firstImport = importScore(1);
|
var firstImport = importScore(1);
|
||||||
var secondimport = importScore(3);
|
var secondImport = importScore(3);
|
||||||
|
|
||||||
presentAndConfirm(firstImport, type);
|
presentAndConfirm(firstImport, type);
|
||||||
returnToMenu();
|
returnToMenu();
|
||||||
presentAndConfirm(secondimport, type);
|
presentAndConfirm(secondImport, type);
|
||||||
returnToMenu();
|
returnToMenu();
|
||||||
returnToMenu();
|
returnToMenu();
|
||||||
}
|
}
|
||||||
@ -78,11 +78,11 @@ namespace osu.Game.Tests.Visual.Navigation
|
|||||||
public void TestFromMainMenuDifferentRuleset([Values] ScorePresentType type)
|
public void TestFromMainMenuDifferentRuleset([Values] ScorePresentType type)
|
||||||
{
|
{
|
||||||
var firstImport = importScore(1);
|
var firstImport = importScore(1);
|
||||||
var secondimport = importScore(3, new ManiaRuleset().RulesetInfo);
|
var secondImport = importScore(3, new ManiaRuleset().RulesetInfo);
|
||||||
|
|
||||||
presentAndConfirm(firstImport, type);
|
presentAndConfirm(firstImport, type);
|
||||||
returnToMenu();
|
returnToMenu();
|
||||||
presentAndConfirm(secondimport, type);
|
presentAndConfirm(secondImport, type);
|
||||||
returnToMenu();
|
returnToMenu();
|
||||||
returnToMenu();
|
returnToMenu();
|
||||||
}
|
}
|
||||||
@ -93,8 +93,8 @@ namespace osu.Game.Tests.Visual.Navigation
|
|||||||
var firstImport = importScore(1);
|
var firstImport = importScore(1);
|
||||||
presentAndConfirm(firstImport, type);
|
presentAndConfirm(firstImport, type);
|
||||||
|
|
||||||
var secondimport = importScore(3);
|
var secondImport = importScore(3);
|
||||||
presentAndConfirm(secondimport, type);
|
presentAndConfirm(secondImport, type);
|
||||||
}
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
@ -103,8 +103,8 @@ namespace osu.Game.Tests.Visual.Navigation
|
|||||||
var firstImport = importScore(1);
|
var firstImport = importScore(1);
|
||||||
presentAndConfirm(firstImport, type);
|
presentAndConfirm(firstImport, type);
|
||||||
|
|
||||||
var secondimport = importScore(3, new ManiaRuleset().RulesetInfo);
|
var secondImport = importScore(3, new ManiaRuleset().RulesetInfo);
|
||||||
presentAndConfirm(secondimport, type);
|
presentAndConfirm(secondImport, type);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void returnToMenu()
|
private void returnToMenu()
|
||||||
|
@ -44,7 +44,7 @@ namespace osu.Game.Tests.Visual.Online
|
|||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(OsuColour colours)
|
private void load(OsuColour colours)
|
||||||
{
|
{
|
||||||
background.Colour = colours.GreySeafoam;
|
background.Colour = colours.GreySeaFoam;
|
||||||
}
|
}
|
||||||
|
|
||||||
private readonly IEnumerable<APIKudosuHistory> items = new[]
|
private readonly IEnumerable<APIKudosuHistory> items = new[]
|
||||||
|
@ -87,7 +87,7 @@ namespace osu.Game.Tests.Visual.Online
|
|||||||
{
|
{
|
||||||
AddStep("Load user", () => user.Value = user_with_filled_values);
|
AddStep("Load user", () => user.Value = user_with_filled_values);
|
||||||
AddAssert("Section is visible", () => section.Alpha == 1);
|
AddAssert("Section is visible", () => section.Alpha == 1);
|
||||||
AddAssert("Array length is the same", () => user_with_filled_values.MonthlyPlaycounts.Length == getChartValuesLength());
|
AddAssert("Array length is the same", () => user_with_filled_values.MonthlyPlayCounts.Length == getChartValuesLength());
|
||||||
}
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
@ -108,13 +108,13 @@ namespace osu.Game.Tests.Visual.Online
|
|||||||
private static readonly APIUser user_with_empty_values = new APIUser
|
private static readonly APIUser user_with_empty_values = new APIUser
|
||||||
{
|
{
|
||||||
Id = 2,
|
Id = 2,
|
||||||
MonthlyPlaycounts = Array.Empty<APIUserHistoryCount>()
|
MonthlyPlayCounts = Array.Empty<APIUserHistoryCount>()
|
||||||
};
|
};
|
||||||
|
|
||||||
private static readonly APIUser user_with_one_value = new APIUser
|
private static readonly APIUser user_with_one_value = new APIUser
|
||||||
{
|
{
|
||||||
Id = 3,
|
Id = 3,
|
||||||
MonthlyPlaycounts = new[]
|
MonthlyPlayCounts = new[]
|
||||||
{
|
{
|
||||||
new APIUserHistoryCount { Date = new DateTime(2010, 5, 1), Count = 100 }
|
new APIUserHistoryCount { Date = new DateTime(2010, 5, 1), Count = 100 }
|
||||||
}
|
}
|
||||||
@ -123,7 +123,7 @@ namespace osu.Game.Tests.Visual.Online
|
|||||||
private static readonly APIUser user_with_two_values = new APIUser
|
private static readonly APIUser user_with_two_values = new APIUser
|
||||||
{
|
{
|
||||||
Id = 4,
|
Id = 4,
|
||||||
MonthlyPlaycounts = new[]
|
MonthlyPlayCounts = new[]
|
||||||
{
|
{
|
||||||
new APIUserHistoryCount { Date = new DateTime(2010, 5, 1), Count = 1 },
|
new APIUserHistoryCount { Date = new DateTime(2010, 5, 1), Count = 1 },
|
||||||
new APIUserHistoryCount { Date = new DateTime(2010, 6, 1), Count = 2 }
|
new APIUserHistoryCount { Date = new DateTime(2010, 6, 1), Count = 2 }
|
||||||
@ -133,7 +133,7 @@ namespace osu.Game.Tests.Visual.Online
|
|||||||
private static readonly APIUser user_with_constant_values = new APIUser
|
private static readonly APIUser user_with_constant_values = new APIUser
|
||||||
{
|
{
|
||||||
Id = 5,
|
Id = 5,
|
||||||
MonthlyPlaycounts = new[]
|
MonthlyPlayCounts = new[]
|
||||||
{
|
{
|
||||||
new APIUserHistoryCount { Date = new DateTime(2010, 5, 1), Count = 5 },
|
new APIUserHistoryCount { Date = new DateTime(2010, 5, 1), Count = 5 },
|
||||||
new APIUserHistoryCount { Date = new DateTime(2010, 6, 1), Count = 5 },
|
new APIUserHistoryCount { Date = new DateTime(2010, 6, 1), Count = 5 },
|
||||||
@ -144,7 +144,7 @@ namespace osu.Game.Tests.Visual.Online
|
|||||||
private static readonly APIUser user_with_zero_values = new APIUser
|
private static readonly APIUser user_with_zero_values = new APIUser
|
||||||
{
|
{
|
||||||
Id = 6,
|
Id = 6,
|
||||||
MonthlyPlaycounts = new[]
|
MonthlyPlayCounts = new[]
|
||||||
{
|
{
|
||||||
new APIUserHistoryCount { Date = new DateTime(2010, 5, 1), Count = 0 },
|
new APIUserHistoryCount { Date = new DateTime(2010, 5, 1), Count = 0 },
|
||||||
new APIUserHistoryCount { Date = new DateTime(2010, 6, 1), Count = 0 },
|
new APIUserHistoryCount { Date = new DateTime(2010, 6, 1), Count = 0 },
|
||||||
@ -155,7 +155,7 @@ namespace osu.Game.Tests.Visual.Online
|
|||||||
private static readonly APIUser user_with_filled_values = new APIUser
|
private static readonly APIUser user_with_filled_values = new APIUser
|
||||||
{
|
{
|
||||||
Id = 7,
|
Id = 7,
|
||||||
MonthlyPlaycounts = new[]
|
MonthlyPlayCounts = new[]
|
||||||
{
|
{
|
||||||
new APIUserHistoryCount { Date = new DateTime(2010, 5, 1), Count = 1000 },
|
new APIUserHistoryCount { Date = new DateTime(2010, 5, 1), Count = 1000 },
|
||||||
new APIUserHistoryCount { Date = new DateTime(2010, 6, 1), Count = 20 },
|
new APIUserHistoryCount { Date = new DateTime(2010, 6, 1), Count = 20 },
|
||||||
@ -170,7 +170,7 @@ namespace osu.Game.Tests.Visual.Online
|
|||||||
private static readonly APIUser user_with_missing_values = new APIUser
|
private static readonly APIUser user_with_missing_values = new APIUser
|
||||||
{
|
{
|
||||||
Id = 8,
|
Id = 8,
|
||||||
MonthlyPlaycounts = new[]
|
MonthlyPlayCounts = new[]
|
||||||
{
|
{
|
||||||
new APIUserHistoryCount { Date = new DateTime(2020, 1, 1), Count = 100 },
|
new APIUserHistoryCount { Date = new DateTime(2020, 1, 1), Count = 100 },
|
||||||
new APIUserHistoryCount { Date = new DateTime(2020, 7, 1), Count = 200 }
|
new APIUserHistoryCount { Date = new DateTime(2020, 7, 1), Count = 200 }
|
||||||
|
@ -309,8 +309,8 @@ namespace osu.Game.Tests.Visual.Online
|
|||||||
|
|
||||||
private class TestStandAloneChatDisplay : StandAloneChatDisplay
|
private class TestStandAloneChatDisplay : StandAloneChatDisplay
|
||||||
{
|
{
|
||||||
public TestStandAloneChatDisplay(bool textbox = false)
|
public TestStandAloneChatDisplay(bool textBox = false)
|
||||||
: base(textbox)
|
: base(textBox)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -39,7 +39,7 @@ namespace osu.Game.Tests.Visual.Settings
|
|||||||
new Box
|
new Box
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
Colour = colours.GreySeafoam
|
Colour = colours.GreySeaFoam
|
||||||
},
|
},
|
||||||
restoreDefaultValueButton = new RestoreDefaultValueButton<float>
|
restoreDefaultValueButton = new RestoreDefaultValueButton<float>
|
||||||
{
|
{
|
||||||
|
@ -61,7 +61,7 @@ namespace osu.Game.Tests.Visual.Settings
|
|||||||
};
|
};
|
||||||
|
|
||||||
[SettingSource("Sample number textbox", "Textbox number entry", SettingControlType = typeof(SettingsNumberBox))]
|
[SettingSource("Sample number textbox", "Textbox number entry", SettingControlType = typeof(SettingsNumberBox))]
|
||||||
public Bindable<int?> IntTextboxBindable { get; } = new Bindable<int?>
|
public Bindable<int?> IntTextBoxBindable { get; } = new Bindable<int?>
|
||||||
{
|
{
|
||||||
Default = null,
|
Default = null,
|
||||||
Value = null
|
Value = null
|
||||||
|
@ -29,10 +29,10 @@ namespace osu.Game.Tests.Visual.UserInterface
|
|||||||
AddStep("Display toast with lengthy text", () => osd.Display(new LengthyToast()));
|
AddStep("Display toast with lengthy text", () => osd.Display(new LengthyToast()));
|
||||||
AddAssert("Toast width is greater than 240", () => osd.Child.Width > 240);
|
AddAssert("Toast width is greater than 240", () => osd.Child.Width > 240);
|
||||||
|
|
||||||
AddRepeatStep("Change toggle (no bind)", () => config.ToggleSetting(TestConfigSetting.ToggleSettingNoKeybind), 2);
|
AddRepeatStep("Change toggle (no bind)", () => config.ToggleSetting(TestConfigSetting.ToggleSettingNoKeyBind), 2);
|
||||||
AddRepeatStep("Change toggle (with bind)", () => config.ToggleSetting(TestConfigSetting.ToggleSettingWithKeybind), 2);
|
AddRepeatStep("Change toggle (with bind)", () => config.ToggleSetting(TestConfigSetting.ToggleSettingWithKeyBind), 2);
|
||||||
AddRepeatStep("Change enum (no bind)", () => config.IncrementEnumSetting(TestConfigSetting.EnumSettingNoKeybind), 3);
|
AddRepeatStep("Change enum (no bind)", () => config.IncrementEnumSetting(TestConfigSetting.EnumSettingNoKeyBind), 3);
|
||||||
AddRepeatStep("Change enum (with bind)", () => config.IncrementEnumSetting(TestConfigSetting.EnumSettingWithKeybind), 3);
|
AddRepeatStep("Change enum (with bind)", () => config.IncrementEnumSetting(TestConfigSetting.EnumSettingWithKeyBind), 3);
|
||||||
}
|
}
|
||||||
|
|
||||||
private class TestConfigManager : ConfigManager<TestConfigSetting>
|
private class TestConfigManager : ConfigManager<TestConfigSetting>
|
||||||
@ -44,10 +44,10 @@ namespace osu.Game.Tests.Visual.UserInterface
|
|||||||
|
|
||||||
protected override void InitialiseDefaults()
|
protected override void InitialiseDefaults()
|
||||||
{
|
{
|
||||||
SetDefault(TestConfigSetting.ToggleSettingNoKeybind, false);
|
SetDefault(TestConfigSetting.ToggleSettingNoKeyBind, false);
|
||||||
SetDefault(TestConfigSetting.EnumSettingNoKeybind, EnumSetting.Setting1);
|
SetDefault(TestConfigSetting.EnumSettingNoKeyBind, EnumSetting.Setting1);
|
||||||
SetDefault(TestConfigSetting.ToggleSettingWithKeybind, false);
|
SetDefault(TestConfigSetting.ToggleSettingWithKeyBind, false);
|
||||||
SetDefault(TestConfigSetting.EnumSettingWithKeybind, EnumSetting.Setting1);
|
SetDefault(TestConfigSetting.EnumSettingWithKeyBind, EnumSetting.Setting1);
|
||||||
|
|
||||||
base.InitialiseDefaults();
|
base.InitialiseDefaults();
|
||||||
}
|
}
|
||||||
@ -64,10 +64,10 @@ namespace osu.Game.Tests.Visual.UserInterface
|
|||||||
|
|
||||||
public override TrackedSettings CreateTrackedSettings() => new TrackedSettings
|
public override TrackedSettings CreateTrackedSettings() => new TrackedSettings
|
||||||
{
|
{
|
||||||
new TrackedSetting<bool>(TestConfigSetting.ToggleSettingNoKeybind, b => new SettingDescription(b, "toggle setting with no keybind", b ? "enabled" : "disabled")),
|
new TrackedSetting<bool>(TestConfigSetting.ToggleSettingNoKeyBind, b => new SettingDescription(b, "toggle setting with no keybind", b ? "enabled" : "disabled")),
|
||||||
new TrackedSetting<EnumSetting>(TestConfigSetting.EnumSettingNoKeybind, v => new SettingDescription(v, "enum setting with no keybind", v.ToString())),
|
new TrackedSetting<EnumSetting>(TestConfigSetting.EnumSettingNoKeyBind, v => new SettingDescription(v, "enum setting with no keybind", v.ToString())),
|
||||||
new TrackedSetting<bool>(TestConfigSetting.ToggleSettingWithKeybind, b => new SettingDescription(b, "toggle setting with keybind", b ? "enabled" : "disabled", "fake keybind")),
|
new TrackedSetting<bool>(TestConfigSetting.ToggleSettingWithKeyBind, b => new SettingDescription(b, "toggle setting with keybind", b ? "enabled" : "disabled", "fake keybind")),
|
||||||
new TrackedSetting<EnumSetting>(TestConfigSetting.EnumSettingWithKeybind, v => new SettingDescription(v, "enum setting with keybind", v.ToString(), "fake keybind")),
|
new TrackedSetting<EnumSetting>(TestConfigSetting.EnumSettingWithKeyBind, v => new SettingDescription(v, "enum setting with keybind", v.ToString(), "fake keybind")),
|
||||||
};
|
};
|
||||||
|
|
||||||
protected override void PerformLoad()
|
protected override void PerformLoad()
|
||||||
@ -79,10 +79,10 @@ namespace osu.Game.Tests.Visual.UserInterface
|
|||||||
|
|
||||||
private enum TestConfigSetting
|
private enum TestConfigSetting
|
||||||
{
|
{
|
||||||
ToggleSettingNoKeybind,
|
ToggleSettingNoKeyBind,
|
||||||
EnumSettingNoKeybind,
|
EnumSettingNoKeyBind,
|
||||||
ToggleSettingWithKeybind,
|
ToggleSettingWithKeyBind,
|
||||||
EnumSettingWithKeybind
|
EnumSettingWithKeyBind
|
||||||
}
|
}
|
||||||
|
|
||||||
private enum EnumSetting
|
private enum EnumSetting
|
||||||
|
@ -62,6 +62,6 @@ namespace osu.Game.Tests.Visual.UserInterface
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void clearTextboxes(IEnumerable<OsuTextBox> textBoxes) => AddStep("clear textbox", () => textBoxes.ForEach(textBox => textBox.Text = null));
|
private void clearTextboxes(IEnumerable<OsuTextBox> textBoxes) => AddStep("clear textbox", () => textBoxes.ForEach(textBox => textBox.Text = null));
|
||||||
private void expectedValue(IEnumerable<OsuTextBox> textBoxes, string value) => AddAssert("expected textbox value", () => textBoxes.All(textbox => textbox.Text == value));
|
private void expectedValue(IEnumerable<OsuTextBox> textBoxes, string value) => AddAssert("expected textbox value", () => textBoxes.All(textBox => textBox.Text == value));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -27,7 +27,7 @@ namespace osu.Game.Tests.Visual.UserInterface
|
|||||||
new Box
|
new Box
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
Colour = colours.GreySeafoam
|
Colour = colours.GreySeaFoam
|
||||||
},
|
},
|
||||||
CreateContent()
|
CreateContent()
|
||||||
});
|
});
|
||||||
|
@ -85,14 +85,14 @@ namespace osu.Game.Tournament.Screens.Drawings.Components
|
|||||||
|
|
||||||
private ScrollState scrollState;
|
private ScrollState scrollState;
|
||||||
|
|
||||||
private void setScrollState(ScrollState newstate)
|
private void setScrollState(ScrollState newState)
|
||||||
{
|
{
|
||||||
if (scrollState == newstate)
|
if (scrollState == newState)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
delayedStateChangeDelegate?.Cancel();
|
delayedStateChangeDelegate?.Cancel();
|
||||||
|
|
||||||
switch (scrollState = newstate)
|
switch (scrollState = newState)
|
||||||
{
|
{
|
||||||
case ScrollState.Scrolling:
|
case ScrollState.Scrolling:
|
||||||
resetSelected();
|
resetSelected();
|
||||||
|
@ -50,7 +50,7 @@ namespace osu.Game.Tournament.Screens.Setup
|
|||||||
{
|
{
|
||||||
new Box
|
new Box
|
||||||
{
|
{
|
||||||
Colour = colours.GreySeafoamDark,
|
Colour = colours.GreySeaFoamDark,
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
},
|
},
|
||||||
new GridContainer
|
new GridContainer
|
||||||
|
@ -94,9 +94,9 @@ namespace osu.Game.Beatmaps.Drawables
|
|||||||
if (colourProvider != null)
|
if (colourProvider != null)
|
||||||
statusText.Colour = status == BeatmapOnlineStatus.Graveyard ? colourProvider.Background1 : colourProvider.Background3;
|
statusText.Colour = status == BeatmapOnlineStatus.Graveyard ? colourProvider.Background1 : colourProvider.Background3;
|
||||||
else
|
else
|
||||||
statusText.Colour = status == BeatmapOnlineStatus.Graveyard ? colours.GreySeafoamLight : Color4.Black;
|
statusText.Colour = status == BeatmapOnlineStatus.Graveyard ? colours.GreySeaFoamLight : Color4.Black;
|
||||||
|
|
||||||
background.Colour = OsuColour.ForBeatmapSetOnlineStatus(Status) ?? colourProvider?.Light1 ?? colours.GreySeafoamLighter;
|
background.Colour = OsuColour.ForBeatmapSetOnlineStatus(Status) ?? colourProvider?.Light1 ?? colours.GreySeaFoamLighter;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -146,8 +146,8 @@ namespace osu.Game.Collections
|
|||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(OsuColour colours)
|
private void load(OsuColour colours)
|
||||||
{
|
{
|
||||||
BackgroundUnfocused = colours.GreySeafoamDarker.Darken(0.5f);
|
BackgroundUnfocused = colours.GreySeaFoamDarker.Darken(0.5f);
|
||||||
BackgroundFocused = colours.GreySeafoam;
|
BackgroundFocused = colours.GreySeaFoam;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -46,7 +46,7 @@ namespace osu.Game.Collections
|
|||||||
{
|
{
|
||||||
new Box
|
new Box
|
||||||
{
|
{
|
||||||
Colour = colours.GreySeafoamDark,
|
Colour = colours.GreySeaFoamDark,
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
},
|
},
|
||||||
new Container
|
new Container
|
||||||
@ -82,7 +82,7 @@ namespace osu.Game.Collections
|
|||||||
Anchor = Anchor.CentreRight,
|
Anchor = Anchor.CentreRight,
|
||||||
Origin = Anchor.CentreRight,
|
Origin = Anchor.CentreRight,
|
||||||
Icon = FontAwesome.Solid.Times,
|
Icon = FontAwesome.Solid.Times,
|
||||||
Colour = colours.GreySeafoamDarker,
|
Colour = colours.GreySeaFoamDarker,
|
||||||
Scale = new Vector2(0.8f),
|
Scale = new Vector2(0.8f),
|
||||||
X = -10,
|
X = -10,
|
||||||
Action = () => State.Value = Visibility.Hidden
|
Action = () => State.Value = Visibility.Hidden
|
||||||
@ -100,7 +100,7 @@ namespace osu.Game.Collections
|
|||||||
new Box
|
new Box
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
Colour = colours.GreySeafoamDarker
|
Colour = colours.GreySeaFoamDarker
|
||||||
},
|
},
|
||||||
new DrawableCollectionList
|
new DrawableCollectionList
|
||||||
{
|
{
|
||||||
|
@ -56,7 +56,7 @@ namespace osu.Game.Graphics
|
|||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(OsuColour colours)
|
private void load(OsuColour colours)
|
||||||
{
|
{
|
||||||
background.Colour = colours.GreySeafoamDarker;
|
background.Colour = colours.GreySeaFoamDarker;
|
||||||
timeText.Colour = colours.BlueLighter;
|
timeText.Colour = colours.BlueLighter;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -212,12 +212,12 @@ namespace osu.Game.Graphics
|
|||||||
public readonly Color4 GreySkyDark = Color4Extensions.FromHex(@"303d47");
|
public readonly Color4 GreySkyDark = Color4Extensions.FromHex(@"303d47");
|
||||||
public readonly Color4 GreySkyDarker = Color4Extensions.FromHex(@"21272c");
|
public readonly Color4 GreySkyDarker = Color4Extensions.FromHex(@"21272c");
|
||||||
|
|
||||||
public readonly Color4 Seafoam = Color4Extensions.FromHex(@"05ffa2");
|
public readonly Color4 SeaFoam = Color4Extensions.FromHex(@"05ffa2");
|
||||||
public readonly Color4 GreySeafoamLighter = Color4Extensions.FromHex(@"9ebab1");
|
public readonly Color4 GreySeaFoamLighter = Color4Extensions.FromHex(@"9ebab1");
|
||||||
public readonly Color4 GreySeafoamLight = Color4Extensions.FromHex(@"4d7365");
|
public readonly Color4 GreySeaFoamLight = Color4Extensions.FromHex(@"4d7365");
|
||||||
public readonly Color4 GreySeafoam = Color4Extensions.FromHex(@"33413c");
|
public readonly Color4 GreySeaFoam = Color4Extensions.FromHex(@"33413c");
|
||||||
public readonly Color4 GreySeafoamDark = Color4Extensions.FromHex(@"2c3532");
|
public readonly Color4 GreySeaFoamDark = Color4Extensions.FromHex(@"2c3532");
|
||||||
public readonly Color4 GreySeafoamDarker = Color4Extensions.FromHex(@"1e2422");
|
public readonly Color4 GreySeaFoamDarker = Color4Extensions.FromHex(@"1e2422");
|
||||||
|
|
||||||
public readonly Color4 Cyan = Color4Extensions.FromHex(@"05f4fd");
|
public readonly Color4 Cyan = Color4Extensions.FromHex(@"05f4fd");
|
||||||
public readonly Color4 GreyCyanLighter = Color4Extensions.FromHex(@"77b1b3");
|
public readonly Color4 GreyCyanLighter = Color4Extensions.FromHex(@"77b1b3");
|
||||||
|
@ -39,10 +39,10 @@ namespace osu.Game.Graphics
|
|||||||
public static IconUsage ListSearch => Get(0xe032);
|
public static IconUsage ListSearch => Get(0xe032);
|
||||||
|
|
||||||
//osu! playstyles
|
//osu! playstyles
|
||||||
public static IconUsage PlaystyleTablet => Get(0xe02a);
|
public static IconUsage PlayStyleTablet => Get(0xe02a);
|
||||||
public static IconUsage PlaystyleMouse => Get(0xe029);
|
public static IconUsage PlayStyleMouse => Get(0xe029);
|
||||||
public static IconUsage PlaystyleKeyboard => Get(0xe02b);
|
public static IconUsage PlayStyleKeyboard => Get(0xe02b);
|
||||||
public static IconUsage PlaystyleTouch => Get(0xe02c);
|
public static IconUsage PlayStyleTouch => Get(0xe02c);
|
||||||
|
|
||||||
// osu! difficulties
|
// osu! difficulties
|
||||||
public static IconUsage EasyOsu => Get(0xe015);
|
public static IconUsage EasyOsu => Get(0xe015);
|
||||||
@ -77,17 +77,17 @@ namespace osu.Game.Graphics
|
|||||||
public static IconUsage ModAutopilot => Get(0xe03a);
|
public static IconUsage ModAutopilot => Get(0xe03a);
|
||||||
public static IconUsage ModAuto => Get(0xe03b);
|
public static IconUsage ModAuto => Get(0xe03b);
|
||||||
public static IconUsage ModCinema => Get(0xe03c);
|
public static IconUsage ModCinema => Get(0xe03c);
|
||||||
public static IconUsage ModDoubletime => Get(0xe03d);
|
public static IconUsage ModDoubleTime => Get(0xe03d);
|
||||||
public static IconUsage ModEasy => Get(0xe03e);
|
public static IconUsage ModEasy => Get(0xe03e);
|
||||||
public static IconUsage ModFlashlight => Get(0xe03f);
|
public static IconUsage ModFlashlight => Get(0xe03f);
|
||||||
public static IconUsage ModHalftime => Get(0xe040);
|
public static IconUsage ModHalftime => Get(0xe040);
|
||||||
public static IconUsage ModHardrock => Get(0xe041);
|
public static IconUsage ModHardRock => Get(0xe041);
|
||||||
public static IconUsage ModHidden => Get(0xe042);
|
public static IconUsage ModHidden => Get(0xe042);
|
||||||
public static IconUsage ModNightcore => Get(0xe043);
|
public static IconUsage ModNightcore => Get(0xe043);
|
||||||
public static IconUsage ModNofail => Get(0xe044);
|
public static IconUsage ModNoFail => Get(0xe044);
|
||||||
public static IconUsage ModRelax => Get(0xe045);
|
public static IconUsage ModRelax => Get(0xe045);
|
||||||
public static IconUsage ModSpunout => Get(0xe046);
|
public static IconUsage ModSpunOut => Get(0xe046);
|
||||||
public static IconUsage ModSuddendeath => Get(0xe047);
|
public static IconUsage ModSuddenDeath => Get(0xe047);
|
||||||
public static IconUsage ModTarget => Get(0xe048);
|
public static IconUsage ModTarget => Get(0xe048);
|
||||||
public static IconUsage ModBg => Get(0xe04a);
|
public static IconUsage ModBg => Get(0xe04a);
|
||||||
}
|
}
|
||||||
|
@ -54,7 +54,7 @@ namespace osu.Game.Graphics.UserInterfaceV2
|
|||||||
|
|
||||||
InternalChild = new Box
|
InternalChild = new Box
|
||||||
{
|
{
|
||||||
Colour = colours.GreySeafoamDarker,
|
Colour = colours.GreySeaFoamDarker,
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -26,7 +26,7 @@ namespace osu.Game.Graphics.UserInterfaceV2
|
|||||||
[BackgroundDependencyLoader(true)]
|
[BackgroundDependencyLoader(true)]
|
||||||
private void load([CanBeNull] OverlayColourProvider colourProvider, OsuColour osuColour)
|
private void load([CanBeNull] OverlayColourProvider colourProvider, OsuColour osuColour)
|
||||||
{
|
{
|
||||||
Background.Colour = colourProvider?.Dark5 ?? osuColour.GreySeafoamDark;
|
Background.Colour = colourProvider?.Dark5 ?? osuColour.GreySeaFoamDark;
|
||||||
|
|
||||||
Content.Padding = new MarginPadding(spacing);
|
Content.Padding = new MarginPadding(spacing);
|
||||||
Content.Spacing = new Vector2(0, spacing);
|
Content.Spacing = new Vector2(0, spacing);
|
||||||
|
@ -23,7 +23,7 @@ namespace osu.Game.Graphics.UserInterfaceV2
|
|||||||
[BackgroundDependencyLoader(true)]
|
[BackgroundDependencyLoader(true)]
|
||||||
private void load([CanBeNull] OverlayColourProvider overlayColourProvider, OsuColour osuColour)
|
private void load([CanBeNull] OverlayColourProvider overlayColourProvider, OsuColour osuColour)
|
||||||
{
|
{
|
||||||
Background.Colour = overlayColourProvider?.Dark6 ?? osuColour.GreySeafoamDarker;
|
Background.Colour = overlayColourProvider?.Dark6 ?? osuColour.GreySeaFoamDarker;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override TextBox CreateHexCodeTextBox() => new OsuTextBox();
|
protected override TextBox CreateHexCodeTextBox() => new OsuTextBox();
|
||||||
|
@ -39,7 +39,7 @@ namespace osu.Game.Graphics.UserInterfaceV2
|
|||||||
[BackgroundDependencyLoader(true)]
|
[BackgroundDependencyLoader(true)]
|
||||||
private void load([CanBeNull] OverlayColourProvider colourProvider, OsuColour colours)
|
private void load([CanBeNull] OverlayColourProvider colourProvider, OsuColour colours)
|
||||||
{
|
{
|
||||||
Background.Colour = Arrow.Colour = colourProvider?.Background4 ?? colours.GreySeafoamDarker;
|
Background.Colour = Arrow.Colour = colourProvider?.Background4 ?? colours.GreySeaFoamDarker;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override Drawable CreateArrow() => Empty();
|
protected override Drawable CreateArrow() => Empty();
|
||||||
|
@ -152,10 +152,10 @@ namespace osu.Game.Online.API.Requests.Responses
|
|||||||
public int ScoresRecentCount;
|
public int ScoresRecentCount;
|
||||||
|
|
||||||
[JsonProperty(@"beatmap_playcounts_count")]
|
[JsonProperty(@"beatmap_playcounts_count")]
|
||||||
public int BeatmapPlaycountsCount;
|
public int BeatmapPlayCountsCount;
|
||||||
|
|
||||||
[JsonProperty]
|
[JsonProperty]
|
||||||
private string[] playstyle
|
private string[] playStyle
|
||||||
{
|
{
|
||||||
set => PlayStyles = value?.Select(str => Enum.Parse(typeof(APIPlayStyle), str, true)).Cast<APIPlayStyle>().ToArray();
|
set => PlayStyles = value?.Select(str => Enum.Parse(typeof(APIPlayStyle), str, true)).Cast<APIPlayStyle>().ToArray();
|
||||||
}
|
}
|
||||||
@ -213,7 +213,7 @@ namespace osu.Game.Online.API.Requests.Responses
|
|||||||
public APIUserAchievement[] Achievements;
|
public APIUserAchievement[] Achievements;
|
||||||
|
|
||||||
[JsonProperty("monthly_playcounts")]
|
[JsonProperty("monthly_playcounts")]
|
||||||
public APIUserHistoryCount[] MonthlyPlaycounts;
|
public APIUserHistoryCount[] MonthlyPlayCounts;
|
||||||
|
|
||||||
[JsonProperty("replays_watched_counts")]
|
[JsonProperty("replays_watched_counts")]
|
||||||
public APIUserHistoryCount[] ReplaysWatchedCounts;
|
public APIUserHistoryCount[] ReplaysWatchedCounts;
|
||||||
|
@ -23,27 +23,27 @@ namespace osu.Game.Online.Chat
|
|||||||
{
|
{
|
||||||
public readonly Bindable<Channel> Channel = new Bindable<Channel>();
|
public readonly Bindable<Channel> Channel = new Bindable<Channel>();
|
||||||
|
|
||||||
protected readonly ChatTextBox Textbox;
|
protected readonly ChatTextBox TextBox;
|
||||||
|
|
||||||
protected ChannelManager ChannelManager;
|
protected ChannelManager ChannelManager;
|
||||||
|
|
||||||
private StandAloneDrawableChannel drawableChannel;
|
private StandAloneDrawableChannel drawableChannel;
|
||||||
|
|
||||||
private readonly bool postingTextbox;
|
private readonly bool postingTextBox;
|
||||||
|
|
||||||
protected readonly Box Background;
|
protected readonly Box Background;
|
||||||
|
|
||||||
private const float textbox_height = 30;
|
private const float text_box_height = 30;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Construct a new instance.
|
/// Construct a new instance.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="postingTextbox">Whether a textbox for posting new messages should be displayed.</param>
|
/// <param name="postingTextBox">Whether a textbox for posting new messages should be displayed.</param>
|
||||||
public StandAloneChatDisplay(bool postingTextbox = false)
|
public StandAloneChatDisplay(bool postingTextBox = false)
|
||||||
{
|
{
|
||||||
const float corner_radius = 10;
|
const float corner_radius = 10;
|
||||||
|
|
||||||
this.postingTextbox = postingTextbox;
|
this.postingTextBox = postingTextBox;
|
||||||
CornerRadius = corner_radius;
|
CornerRadius = corner_radius;
|
||||||
Masking = true;
|
Masking = true;
|
||||||
|
|
||||||
@ -57,12 +57,12 @@ namespace osu.Game.Online.Chat
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
if (postingTextbox)
|
if (postingTextBox)
|
||||||
{
|
{
|
||||||
AddInternal(Textbox = new ChatTextBox
|
AddInternal(TextBox = new ChatTextBox
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.X,
|
RelativeSizeAxes = Axes.X,
|
||||||
Height = textbox_height,
|
Height = text_box_height,
|
||||||
PlaceholderText = "type your message",
|
PlaceholderText = "type your message",
|
||||||
CornerRadius = corner_radius,
|
CornerRadius = corner_radius,
|
||||||
ReleaseFocusOnCommit = false,
|
ReleaseFocusOnCommit = false,
|
||||||
@ -71,7 +71,7 @@ namespace osu.Game.Online.Chat
|
|||||||
Origin = Anchor.BottomLeft,
|
Origin = Anchor.BottomLeft,
|
||||||
});
|
});
|
||||||
|
|
||||||
Textbox.OnCommit += postMessage;
|
TextBox.OnCommit += postMessage;
|
||||||
}
|
}
|
||||||
|
|
||||||
Channel.BindValueChanged(channelChanged);
|
Channel.BindValueChanged(channelChanged);
|
||||||
@ -86,9 +86,9 @@ namespace osu.Game.Online.Chat
|
|||||||
protected virtual StandAloneDrawableChannel CreateDrawableChannel(Channel channel) =>
|
protected virtual StandAloneDrawableChannel CreateDrawableChannel(Channel channel) =>
|
||||||
new StandAloneDrawableChannel(channel);
|
new StandAloneDrawableChannel(channel);
|
||||||
|
|
||||||
private void postMessage(TextBox sender, bool newtext)
|
private void postMessage(TextBox sender, bool newText)
|
||||||
{
|
{
|
||||||
string text = Textbox.Text.Trim();
|
string text = TextBox.Text.Trim();
|
||||||
|
|
||||||
if (string.IsNullOrWhiteSpace(text))
|
if (string.IsNullOrWhiteSpace(text))
|
||||||
return;
|
return;
|
||||||
@ -98,7 +98,7 @@ namespace osu.Game.Online.Chat
|
|||||||
else
|
else
|
||||||
ChannelManager?.PostMessage(text, target: Channel.Value);
|
ChannelManager?.PostMessage(text, target: Channel.Value);
|
||||||
|
|
||||||
Textbox.Text = string.Empty;
|
TextBox.Text = string.Empty;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected virtual ChatLine CreateMessage(Message message) => new StandAloneMessage(message);
|
protected virtual ChatLine CreateMessage(Message message) => new StandAloneMessage(message);
|
||||||
@ -111,7 +111,7 @@ namespace osu.Game.Online.Chat
|
|||||||
|
|
||||||
drawableChannel = CreateDrawableChannel(e.NewValue);
|
drawableChannel = CreateDrawableChannel(e.NewValue);
|
||||||
drawableChannel.CreateChatLineAction = CreateMessage;
|
drawableChannel.CreateChatLineAction = CreateMessage;
|
||||||
drawableChannel.Padding = new MarginPadding { Bottom = postingTextbox ? textbox_height : 0 };
|
drawableChannel.Padding = new MarginPadding { Bottom = postingTextBox ? text_box_height : 0 };
|
||||||
|
|
||||||
AddInternal(drawableChannel);
|
AddInternal(drawableChannel);
|
||||||
}
|
}
|
||||||
|
@ -113,7 +113,7 @@ namespace osu.Game.Online.Rooms
|
|||||||
}
|
}
|
||||||
|
|
||||||
public bool ShouldSerializeID() => false;
|
public bool ShouldSerializeID() => false;
|
||||||
public bool ShouldSerializeapiBeatmap() => false;
|
public bool ShouldSerializeAPIBeatmap() => false;
|
||||||
|
|
||||||
public bool Equals(PlaylistItem other)
|
public bool Equals(PlaylistItem other)
|
||||||
=> ID == other?.ID
|
=> ID == other?.ID
|
||||||
|
@ -152,12 +152,12 @@ namespace osu.Game.Overlays.AccountCreation
|
|||||||
loadingLayer.Hide();
|
loadingLayer.Hide();
|
||||||
|
|
||||||
if (host?.OnScreenKeyboardOverlapsGameWindow != true)
|
if (host?.OnScreenKeyboardOverlapsGameWindow != true)
|
||||||
focusNextTextbox();
|
focusNextTextBox();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void performRegistration()
|
private void performRegistration()
|
||||||
{
|
{
|
||||||
if (focusNextTextbox())
|
if (focusNextTextBox())
|
||||||
{
|
{
|
||||||
registerShake.Shake();
|
registerShake.Shake();
|
||||||
return;
|
return;
|
||||||
@ -209,19 +209,19 @@ namespace osu.Game.Overlays.AccountCreation
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
private bool focusNextTextbox()
|
private bool focusNextTextBox()
|
||||||
{
|
{
|
||||||
var nextTextbox = nextUnfilledTextbox();
|
var nextTextBox = nextUnfilledTextBox();
|
||||||
|
|
||||||
if (nextTextbox != null)
|
if (nextTextBox != null)
|
||||||
{
|
{
|
||||||
Schedule(() => GetContainingInputManager().ChangeFocus(nextTextbox));
|
Schedule(() => GetContainingInputManager().ChangeFocus(nextTextBox));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
private OsuTextBox nextUnfilledTextbox() => textboxes.FirstOrDefault(t => string.IsNullOrEmpty(t.Text));
|
private OsuTextBox nextUnfilledTextBox() => textboxes.FirstOrDefault(t => string.IsNullOrEmpty(t.Text));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -38,7 +38,7 @@ namespace osu.Game.Overlays
|
|||||||
public LocalisableString Title => ChatStrings.HeaderTitle;
|
public LocalisableString Title => ChatStrings.HeaderTitle;
|
||||||
public LocalisableString Description => ChatStrings.HeaderDescription;
|
public LocalisableString Description => ChatStrings.HeaderDescription;
|
||||||
|
|
||||||
private const float textbox_height = 60;
|
private const float text_box_height = 60;
|
||||||
private const float channel_selection_min_height = 0.3f;
|
private const float channel_selection_min_height = 0.3f;
|
||||||
|
|
||||||
[Resolved]
|
[Resolved]
|
||||||
@ -50,7 +50,7 @@ namespace osu.Game.Overlays
|
|||||||
|
|
||||||
private LoadingSpinner loading;
|
private LoadingSpinner loading;
|
||||||
|
|
||||||
private FocusedTextBox textbox;
|
private FocusedTextBox textBox;
|
||||||
|
|
||||||
private const int transition_length = 500;
|
private const int transition_length = 500;
|
||||||
|
|
||||||
@ -133,7 +133,7 @@ namespace osu.Game.Overlays
|
|||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
Padding = new MarginPadding
|
Padding = new MarginPadding
|
||||||
{
|
{
|
||||||
Bottom = textbox_height
|
Bottom = text_box_height
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
new Container
|
new Container
|
||||||
@ -141,7 +141,7 @@ namespace osu.Game.Overlays
|
|||||||
Anchor = Anchor.BottomLeft,
|
Anchor = Anchor.BottomLeft,
|
||||||
Origin = Anchor.BottomLeft,
|
Origin = Anchor.BottomLeft,
|
||||||
RelativeSizeAxes = Axes.X,
|
RelativeSizeAxes = Axes.X,
|
||||||
Height = textbox_height,
|
Height = text_box_height,
|
||||||
Padding = new MarginPadding
|
Padding = new MarginPadding
|
||||||
{
|
{
|
||||||
Top = padding * 2,
|
Top = padding * 2,
|
||||||
@ -151,7 +151,7 @@ namespace osu.Game.Overlays
|
|||||||
},
|
},
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
textbox = new FocusedTextBox
|
textBox = new FocusedTextBox
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
Height = 1,
|
Height = 1,
|
||||||
@ -197,7 +197,7 @@ namespace osu.Game.Overlays
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
textbox.OnCommit += postMessage;
|
textBox.OnCommit += postMessage;
|
||||||
|
|
||||||
ChannelTabControl.Current.ValueChanged += current => channelManager.CurrentChannel.Value = current.NewValue;
|
ChannelTabControl.Current.ValueChanged += current => channelManager.CurrentChannel.Value = current.NewValue;
|
||||||
ChannelTabControl.ChannelSelectorActive.ValueChanged += active => ChannelSelectionOverlay.State.Value = active.NewValue ? Visibility.Visible : Visibility.Hidden;
|
ChannelTabControl.ChannelSelectorActive.ValueChanged += active => ChannelSelectionOverlay.State.Value = active.NewValue ? Visibility.Visible : Visibility.Hidden;
|
||||||
@ -208,12 +208,12 @@ namespace osu.Game.Overlays
|
|||||||
|
|
||||||
if (state.NewValue == Visibility.Visible)
|
if (state.NewValue == Visibility.Visible)
|
||||||
{
|
{
|
||||||
textbox.HoldFocus = false;
|
textBox.HoldFocus = false;
|
||||||
if (1f - ChatHeight.Value < channel_selection_min_height)
|
if (1f - ChatHeight.Value < channel_selection_min_height)
|
||||||
this.TransformBindableTo(ChatHeight, 1f - channel_selection_min_height, 800, Easing.OutQuint);
|
this.TransformBindableTo(ChatHeight, 1f - channel_selection_min_height, 800, Easing.OutQuint);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
textbox.HoldFocus = true;
|
textBox.HoldFocus = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
ChannelSelectionOverlay.OnRequestJoin = channel => channelManager.JoinChannel(channel);
|
ChannelSelectionOverlay.OnRequestJoin = channel => channelManager.JoinChannel(channel);
|
||||||
@ -253,7 +253,7 @@ namespace osu.Game.Overlays
|
|||||||
{
|
{
|
||||||
if (e.NewValue == null)
|
if (e.NewValue == null)
|
||||||
{
|
{
|
||||||
textbox.Current.Disabled = true;
|
textBox.Current.Disabled = true;
|
||||||
currentChannelContainer.Clear(false);
|
currentChannelContainer.Clear(false);
|
||||||
ChannelSelectionOverlay.Show();
|
ChannelSelectionOverlay.Show();
|
||||||
return;
|
return;
|
||||||
@ -262,7 +262,7 @@ namespace osu.Game.Overlays
|
|||||||
if (e.NewValue is ChannelSelectorTabItem.ChannelSelectorTabChannel)
|
if (e.NewValue is ChannelSelectorTabItem.ChannelSelectorTabChannel)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
textbox.Current.Disabled = e.NewValue.ReadOnly;
|
textBox.Current.Disabled = e.NewValue.ReadOnly;
|
||||||
|
|
||||||
if (ChannelTabControl.Current.Value != e.NewValue)
|
if (ChannelTabControl.Current.Value != e.NewValue)
|
||||||
Scheduler.Add(() => ChannelTabControl.Current.Value = e.NewValue);
|
Scheduler.Add(() => ChannelTabControl.Current.Value = e.NewValue);
|
||||||
@ -402,7 +402,7 @@ namespace osu.Game.Overlays
|
|||||||
protected override void OnFocus(FocusEvent e)
|
protected override void OnFocus(FocusEvent e)
|
||||||
{
|
{
|
||||||
// this is necessary as textbox is masked away and therefore can't get focus :(
|
// this is necessary as textbox is masked away and therefore can't get focus :(
|
||||||
textbox.TakeFocus();
|
textBox.TakeFocus();
|
||||||
base.OnFocus(e);
|
base.OnFocus(e);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -411,7 +411,7 @@ namespace osu.Game.Overlays
|
|||||||
this.MoveToY(0, transition_length, Easing.OutQuint);
|
this.MoveToY(0, transition_length, Easing.OutQuint);
|
||||||
this.FadeIn(transition_length, Easing.OutQuint);
|
this.FadeIn(transition_length, Easing.OutQuint);
|
||||||
|
|
||||||
textbox.HoldFocus = true;
|
textBox.HoldFocus = true;
|
||||||
|
|
||||||
base.PopIn();
|
base.PopIn();
|
||||||
}
|
}
|
||||||
@ -423,7 +423,7 @@ namespace osu.Game.Overlays
|
|||||||
|
|
||||||
ChannelSelectionOverlay.Hide();
|
ChannelSelectionOverlay.Hide();
|
||||||
|
|
||||||
textbox.HoldFocus = false;
|
textBox.HoldFocus = false;
|
||||||
base.PopOut();
|
base.PopOut();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -481,9 +481,9 @@ namespace osu.Game.Overlays
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void postMessage(TextBox textbox, bool newText)
|
private void postMessage(TextBox textBox, bool newText)
|
||||||
{
|
{
|
||||||
string text = textbox.Text.Trim();
|
string text = textBox.Text.Trim();
|
||||||
|
|
||||||
if (string.IsNullOrWhiteSpace(text))
|
if (string.IsNullOrWhiteSpace(text))
|
||||||
return;
|
return;
|
||||||
@ -493,7 +493,7 @@ namespace osu.Game.Overlays
|
|||||||
else
|
else
|
||||||
channelManager.PostMessage(text);
|
channelManager.PostMessage(text);
|
||||||
|
|
||||||
textbox.Text = string.Empty;
|
textBox.Text = string.Empty;
|
||||||
}
|
}
|
||||||
|
|
||||||
private class TabsArea : Container
|
private class TabsArea : Container
|
||||||
|
@ -98,7 +98,7 @@ namespace osu.Game.Overlays.Profile.Header.Components
|
|||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(OsuColour colours)
|
private void load(OsuColour colours)
|
||||||
{
|
{
|
||||||
background.Colour = colours.GreySeafoamDarker;
|
background.Colour = colours.GreySeaFoamDarker;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void LoadComplete()
|
protected override void LoadComplete()
|
||||||
|
@ -28,7 +28,7 @@ namespace osu.Game.Overlays.Profile.Sections.Historical
|
|||||||
ItemsContainer.Direction = FillDirection.Vertical;
|
ItemsContainer.Direction = FillDirection.Vertical;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override int GetCount(APIUser user) => user.BeatmapPlaycountsCount;
|
protected override int GetCount(APIUser user) => user.BeatmapPlayCountsCount;
|
||||||
|
|
||||||
protected override APIRequest<List<APIUserMostPlayedBeatmap>> CreateRequest() =>
|
protected override APIRequest<List<APIUserMostPlayedBeatmap>> CreateRequest() =>
|
||||||
new GetUserMostPlayedBeatmapsRequest(User.Value.Id, VisiblePages++, ItemsPerPage);
|
new GetUserMostPlayedBeatmapsRequest(User.Value.Id, VisiblePages++, ItemsPerPage);
|
||||||
|
@ -17,6 +17,6 @@ namespace osu.Game.Overlays.Profile.Sections.Historical
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override APIUserHistoryCount[] GetValues(APIUser user) => user?.MonthlyPlaycounts;
|
protected override APIUserHistoryCount[] GetValues(APIUser user) => user?.MonthlyPlayCounts;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -50,7 +50,7 @@ namespace osu.Game.Overlays.Profile.Sections.Kudosu
|
|||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load()
|
private void load()
|
||||||
{
|
{
|
||||||
date.Colour = colours.GreySeafoamLighter;
|
date.Colour = colours.GreySeaFoamLighter;
|
||||||
var formattedSource = MessageFormatter.FormatText(getString(historyItem));
|
var formattedSource = MessageFormatter.FormatText(getString(historyItem));
|
||||||
linkFlowContainer.AddLinks(formattedSource.Text, formattedSource.Links);
|
linkFlowContainer.AddLinks(formattedSource.Text, formattedSource.Links);
|
||||||
}
|
}
|
||||||
|
@ -63,7 +63,7 @@ namespace osu.Game.Overlays.Settings.Sections.Maintenance
|
|||||||
new Box
|
new Box
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
Colour = colours.GreySeafoamDark
|
Colour = colours.GreySeaFoamDark
|
||||||
},
|
},
|
||||||
new GridContainer
|
new GridContainer
|
||||||
{
|
{
|
||||||
|
@ -25,7 +25,7 @@ namespace osu.Game.Rulesets.Mods
|
|||||||
|
|
||||||
public void ApplyToHUD(HUDOverlay overlay)
|
public void ApplyToHUD(HUDOverlay overlay)
|
||||||
{
|
{
|
||||||
overlay.ShowHealthbar.BindTo(showHealthBar);
|
overlay.ShowHealthBar.BindTo(showHealthBar);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -14,7 +14,7 @@ namespace osu.Game.Rulesets.Mods
|
|||||||
{
|
{
|
||||||
public override string Name => "Double Time";
|
public override string Name => "Double Time";
|
||||||
public override string Acronym => "DT";
|
public override string Acronym => "DT";
|
||||||
public override IconUsage? Icon => OsuIcon.ModDoubletime;
|
public override IconUsage? Icon => OsuIcon.ModDoubleTime;
|
||||||
public override ModType Type => ModType.DifficultyIncrease;
|
public override ModType Type => ModType.DifficultyIncrease;
|
||||||
public override string Description => "Zoooooooooom...";
|
public override string Description => "Zoooooooooom...";
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@ namespace osu.Game.Rulesets.Mods
|
|||||||
{
|
{
|
||||||
public override string Name => "Hard Rock";
|
public override string Name => "Hard Rock";
|
||||||
public override string Acronym => "HR";
|
public override string Acronym => "HR";
|
||||||
public override IconUsage? Icon => OsuIcon.ModHardrock;
|
public override IconUsage? Icon => OsuIcon.ModHardRock;
|
||||||
public override ModType Type => ModType.DifficultyIncrease;
|
public override ModType Type => ModType.DifficultyIncrease;
|
||||||
public override string Description => "Everything just got a bit harder...";
|
public override string Description => "Everything just got a bit harder...";
|
||||||
public override Type[] IncompatibleMods => new[] { typeof(ModEasy), typeof(ModDifficultyAdjust) };
|
public override Type[] IncompatibleMods => new[] { typeof(ModEasy), typeof(ModDifficultyAdjust) };
|
||||||
|
@ -11,7 +11,7 @@ namespace osu.Game.Rulesets.Mods
|
|||||||
{
|
{
|
||||||
public override string Name => "No Fail";
|
public override string Name => "No Fail";
|
||||||
public override string Acronym => "NF";
|
public override string Acronym => "NF";
|
||||||
public override IconUsage? Icon => OsuIcon.ModNofail;
|
public override IconUsage? Icon => OsuIcon.ModNoFail;
|
||||||
public override ModType Type => ModType.DifficultyReduction;
|
public override ModType Type => ModType.DifficultyReduction;
|
||||||
public override string Description => "You can't fail, no matter what.";
|
public override string Description => "You can't fail, no matter what.";
|
||||||
public override double ScoreMultiplier => 0.5;
|
public override double ScoreMultiplier => 0.5;
|
||||||
|
@ -14,7 +14,7 @@ namespace osu.Game.Rulesets.Mods
|
|||||||
{
|
{
|
||||||
public override string Name => "Sudden Death";
|
public override string Name => "Sudden Death";
|
||||||
public override string Acronym => "SD";
|
public override string Acronym => "SD";
|
||||||
public override IconUsage? Icon => OsuIcon.ModSuddendeath;
|
public override IconUsage? Icon => OsuIcon.ModSuddenDeath;
|
||||||
public override ModType Type => ModType.DifficultyIncrease;
|
public override ModType Type => ModType.DifficultyIncrease;
|
||||||
public override string Description => "Miss and fail.";
|
public override string Description => "Miss and fail.";
|
||||||
public override double ScoreMultiplier => 1;
|
public override double ScoreMultiplier => 1;
|
||||||
|
@ -188,12 +188,12 @@ namespace osu.Game.Rulesets.Objects.Legacy
|
|||||||
string[] split = str.Split(':');
|
string[] split = str.Split(':');
|
||||||
|
|
||||||
var bank = (LegacySampleBank)Parsing.ParseInt(split[0]);
|
var bank = (LegacySampleBank)Parsing.ParseInt(split[0]);
|
||||||
var addbank = (LegacySampleBank)Parsing.ParseInt(split[1]);
|
var addBank = (LegacySampleBank)Parsing.ParseInt(split[1]);
|
||||||
|
|
||||||
string stringBank = bank.ToString().ToLowerInvariant();
|
string stringBank = bank.ToString().ToLowerInvariant();
|
||||||
if (stringBank == @"none")
|
if (stringBank == @"none")
|
||||||
stringBank = null;
|
stringBank = null;
|
||||||
string stringAddBank = addbank.ToString().ToLowerInvariant();
|
string stringAddBank = addBank.ToString().ToLowerInvariant();
|
||||||
if (stringAddBank == @"none")
|
if (stringAddBank == @"none")
|
||||||
stringAddBank = null;
|
stringAddBank = null;
|
||||||
|
|
||||||
|
@ -250,13 +250,13 @@ namespace osu.Game.Rulesets.Objects
|
|||||||
if (subControlPoints.Length != 3)
|
if (subControlPoints.Length != 3)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
List<Vector2> subpath = PathApproximator.ApproximateCircularArc(subControlPoints);
|
List<Vector2> subPath = PathApproximator.ApproximateCircularArc(subControlPoints);
|
||||||
|
|
||||||
// If for some reason a circular arc could not be fit to the 3 given points, fall back to a numerically stable bezier approximation.
|
// If for some reason a circular arc could not be fit to the 3 given points, fall back to a numerically stable bezier approximation.
|
||||||
if (subpath.Count == 0)
|
if (subPath.Count == 0)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
return subpath;
|
return subPath;
|
||||||
|
|
||||||
case PathType.Catmull:
|
case PathType.Catmull:
|
||||||
return PathApproximator.ApproximateCatmull(subControlPoints);
|
return PathApproximator.ApproximateCatmull(subControlPoints);
|
||||||
|
@ -56,7 +56,7 @@ namespace osu.Game.Screens.Edit.Setup
|
|||||||
{
|
{
|
||||||
new Box
|
new Box
|
||||||
{
|
{
|
||||||
Colour = colours.GreySeafoamDarker,
|
Colour = colours.GreySeaFoamDarker,
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
},
|
},
|
||||||
new OsuTextFlowContainer(t => t.Font = OsuFont.Default.With(size: 24))
|
new OsuTextFlowContainer(t => t.Font = OsuFont.Default.With(size: 24))
|
||||||
|
@ -41,7 +41,7 @@ namespace osu.Game.Screens.Edit.Timing
|
|||||||
}
|
}
|
||||||
|
|
||||||
private readonly SettingsSlider<T> slider;
|
private readonly SettingsSlider<T> slider;
|
||||||
private readonly LabelledTextBox textbox;
|
private readonly LabelledTextBox textBox;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Creates an <see cref="IndeterminateSliderWithTextBoxInput{T}"/>.
|
/// Creates an <see cref="IndeterminateSliderWithTextBoxInput{T}"/>.
|
||||||
@ -66,7 +66,7 @@ namespace osu.Game.Screens.Edit.Timing
|
|||||||
Spacing = new Vector2(0, 5),
|
Spacing = new Vector2(0, 5),
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
textbox = new LabelledTextBox
|
textBox = new LabelledTextBox
|
||||||
{
|
{
|
||||||
Label = labelText,
|
Label = labelText,
|
||||||
},
|
},
|
||||||
@ -80,7 +80,7 @@ namespace osu.Game.Screens.Edit.Timing
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
textbox.OnCommit += (t, isNew) =>
|
textBox.OnCommit += (t, isNew) =>
|
||||||
{
|
{
|
||||||
if (!isNew) return;
|
if (!isNew) return;
|
||||||
|
|
||||||
@ -110,13 +110,13 @@ namespace osu.Game.Screens.Edit.Timing
|
|||||||
|
|
||||||
// use the value from the slider to ensure that any precision/min/max set on it via the initial indeterminate value have been applied correctly.
|
// use the value from the slider to ensure that any precision/min/max set on it via the initial indeterminate value have been applied correctly.
|
||||||
decimal decimalValue = slider.Current.Value.ToDecimal(NumberFormatInfo.InvariantInfo);
|
decimal decimalValue = slider.Current.Value.ToDecimal(NumberFormatInfo.InvariantInfo);
|
||||||
textbox.Text = decimalValue.ToString($@"N{FormatUtils.FindPrecision(decimalValue)}");
|
textBox.Text = decimalValue.ToString($@"N{FormatUtils.FindPrecision(decimalValue)}");
|
||||||
textbox.PlaceholderText = string.Empty;
|
textBox.PlaceholderText = string.Empty;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
textbox.Text = null;
|
textBox.Text = null;
|
||||||
textbox.PlaceholderText = "(multiple)";
|
textBox.PlaceholderText = "(multiple)";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -19,7 +19,7 @@ namespace osu.Game.Screens.Edit.Timing
|
|||||||
|
|
||||||
public SliderWithTextBoxInput(LocalisableString labelText)
|
public SliderWithTextBoxInput(LocalisableString labelText)
|
||||||
{
|
{
|
||||||
LabelledTextBox textbox;
|
LabelledTextBox textBox;
|
||||||
|
|
||||||
RelativeSizeAxes = Axes.X;
|
RelativeSizeAxes = Axes.X;
|
||||||
AutoSizeAxes = Axes.Y;
|
AutoSizeAxes = Axes.Y;
|
||||||
@ -33,7 +33,7 @@ namespace osu.Game.Screens.Edit.Timing
|
|||||||
Direction = FillDirection.Vertical,
|
Direction = FillDirection.Vertical,
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
textbox = new LabelledTextBox
|
textBox = new LabelledTextBox
|
||||||
{
|
{
|
||||||
Label = labelText,
|
Label = labelText,
|
||||||
},
|
},
|
||||||
@ -46,7 +46,7 @@ namespace osu.Game.Screens.Edit.Timing
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
textbox.OnCommit += (t, isNew) =>
|
textBox.OnCommit += (t, isNew) =>
|
||||||
{
|
{
|
||||||
if (!isNew) return;
|
if (!isNew) return;
|
||||||
|
|
||||||
@ -66,7 +66,7 @@ namespace osu.Game.Screens.Edit.Timing
|
|||||||
|
|
||||||
Current.BindValueChanged(val =>
|
Current.BindValueChanged(val =>
|
||||||
{
|
{
|
||||||
textbox.Text = val.NewValue.ToString();
|
textBox.Text = val.NewValue.ToString();
|
||||||
}, true);
|
}, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -54,7 +54,7 @@ namespace osu.Game.Screens.Import
|
|||||||
{
|
{
|
||||||
new Box
|
new Box
|
||||||
{
|
{
|
||||||
Colour = colours.GreySeafoamDark,
|
Colour = colours.GreySeaFoamDark,
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
},
|
},
|
||||||
fileSelector = new OsuFileSelector(validFileExtensions: game.HandledExtensions.ToArray())
|
fileSelector = new OsuFileSelector(validFileExtensions: game.HandledExtensions.ToArray())
|
||||||
@ -72,7 +72,7 @@ namespace osu.Game.Screens.Import
|
|||||||
{
|
{
|
||||||
new Box
|
new Box
|
||||||
{
|
{
|
||||||
Colour = colours.GreySeafoamDarker,
|
Colour = colours.GreySeaFoamDarker,
|
||||||
RelativeSizeAxes = Axes.Both
|
RelativeSizeAxes = Axes.Both
|
||||||
},
|
},
|
||||||
new Container
|
new Container
|
||||||
|
@ -193,7 +193,7 @@ namespace osu.Game.Screens.OnlinePlay.Lounge
|
|||||||
this.room = room;
|
this.room = room;
|
||||||
}
|
}
|
||||||
|
|
||||||
private OsuPasswordTextBox passwordTextbox;
|
private OsuPasswordTextBox passwordTextBox;
|
||||||
private TriangleButton joinButton;
|
private TriangleButton joinButton;
|
||||||
private OsuSpriteText errorText;
|
private OsuSpriteText errorText;
|
||||||
private Sample sampleJoinFail;
|
private Sample sampleJoinFail;
|
||||||
@ -218,7 +218,7 @@ namespace osu.Game.Screens.OnlinePlay.Lounge
|
|||||||
AutoSizeAxes = Axes.Both,
|
AutoSizeAxes = Axes.Both,
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
passwordTextbox = new OsuPasswordTextBox
|
passwordTextBox = new OsuPasswordTextBox
|
||||||
{
|
{
|
||||||
Width = 200,
|
Width = 200,
|
||||||
PlaceholderText = "password",
|
PlaceholderText = "password",
|
||||||
@ -246,21 +246,21 @@ namespace osu.Game.Screens.OnlinePlay.Lounge
|
|||||||
{
|
{
|
||||||
base.LoadComplete();
|
base.LoadComplete();
|
||||||
|
|
||||||
Schedule(() => GetContainingInputManager().ChangeFocus(passwordTextbox));
|
Schedule(() => GetContainingInputManager().ChangeFocus(passwordTextBox));
|
||||||
passwordTextbox.OnCommit += (_, __) => performJoin();
|
passwordTextBox.OnCommit += (_, __) => performJoin();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void performJoin()
|
private void performJoin()
|
||||||
{
|
{
|
||||||
lounge?.Join(room, passwordTextbox.Text, null, joinFailed);
|
lounge?.Join(room, passwordTextBox.Text, null, joinFailed);
|
||||||
GetContainingInputManager().TriggerFocusContention(passwordTextbox);
|
GetContainingInputManager().TriggerFocusContention(passwordTextBox);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void joinFailed(string error) => Schedule(() =>
|
private void joinFailed(string error) => Schedule(() =>
|
||||||
{
|
{
|
||||||
passwordTextbox.Text = string.Empty;
|
passwordTextBox.Text = string.Empty;
|
||||||
|
|
||||||
GetContainingInputManager().ChangeFocus(passwordTextbox);
|
GetContainingInputManager().ChangeFocus(passwordTextBox);
|
||||||
|
|
||||||
errorText.Text = error;
|
errorText.Text = error;
|
||||||
errorText
|
errorText
|
||||||
|
@ -24,7 +24,7 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer
|
|||||||
|
|
||||||
public Bindable<bool> Expanded = new Bindable<bool>();
|
public Bindable<bool> Expanded = new Bindable<bool>();
|
||||||
|
|
||||||
private readonly Bindable<bool> expandedFromTextboxFocus = new Bindable<bool>();
|
private readonly Bindable<bool> expandedFromTextBoxFocus = new Bindable<bool>();
|
||||||
|
|
||||||
private const float height = 100;
|
private const float height = 100;
|
||||||
|
|
||||||
@ -37,7 +37,7 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer
|
|||||||
|
|
||||||
Background.Alpha = 0.2f;
|
Background.Alpha = 0.2f;
|
||||||
|
|
||||||
Textbox.FocusLost = () => expandedFromTextboxFocus.Value = false;
|
TextBox.FocusLost = () => expandedFromTextBoxFocus.Value = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override bool OnHover(HoverEvent e) => true; // use UI mouse cursor.
|
protected override bool OnHover(HoverEvent e) => true; // use UI mouse cursor.
|
||||||
@ -51,14 +51,14 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer
|
|||||||
{
|
{
|
||||||
// for now let's never hold focus. this avoid misdirected gameplay keys entering chat.
|
// for now let's never hold focus. this avoid misdirected gameplay keys entering chat.
|
||||||
// note that this is done within this callback as it triggers an un-focus as well.
|
// note that this is done within this callback as it triggers an un-focus as well.
|
||||||
Textbox.HoldFocus = false;
|
TextBox.HoldFocus = false;
|
||||||
|
|
||||||
// only hold focus (after sending a message) during breaks
|
// only hold focus (after sending a message) during breaks
|
||||||
Textbox.ReleaseFocusOnCommit = playing.NewValue;
|
TextBox.ReleaseFocusOnCommit = playing.NewValue;
|
||||||
}, true);
|
}, true);
|
||||||
|
|
||||||
Expanded.BindValueChanged(_ => updateExpandedState(), true);
|
Expanded.BindValueChanged(_ => updateExpandedState(), true);
|
||||||
expandedFromTextboxFocus.BindValueChanged(focus =>
|
expandedFromTextBoxFocus.BindValueChanged(focus =>
|
||||||
{
|
{
|
||||||
if (focus.NewValue)
|
if (focus.NewValue)
|
||||||
updateExpandedState();
|
updateExpandedState();
|
||||||
@ -76,25 +76,25 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer
|
|||||||
switch (e.Action)
|
switch (e.Action)
|
||||||
{
|
{
|
||||||
case GlobalAction.Back:
|
case GlobalAction.Back:
|
||||||
if (Textbox.HasFocus)
|
if (TextBox.HasFocus)
|
||||||
{
|
{
|
||||||
Schedule(() => Textbox.KillFocus());
|
Schedule(() => TextBox.KillFocus());
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case GlobalAction.ToggleChatFocus:
|
case GlobalAction.ToggleChatFocus:
|
||||||
if (Textbox.HasFocus)
|
if (TextBox.HasFocus)
|
||||||
{
|
{
|
||||||
Schedule(() => Textbox.KillFocus());
|
Schedule(() => TextBox.KillFocus());
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
expandedFromTextboxFocus.Value = true;
|
expandedFromTextBoxFocus.Value = true;
|
||||||
|
|
||||||
// schedule required to ensure the textbox has become present from above bindable update.
|
// schedule required to ensure the textbox has become present from above bindable update.
|
||||||
Schedule(() => Textbox.TakeFocus());
|
Schedule(() => TextBox.TakeFocus());
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
@ -109,7 +109,7 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer
|
|||||||
|
|
||||||
private void updateExpandedState()
|
private void updateExpandedState()
|
||||||
{
|
{
|
||||||
if (Expanded.Value || expandedFromTextboxFocus.Value)
|
if (Expanded.Value || expandedFromTextBoxFocus.Value)
|
||||||
{
|
{
|
||||||
this.FadeIn(300, Easing.OutQuint);
|
this.FadeIn(300, Easing.OutQuint);
|
||||||
this.ResizeHeightTo(height, 500, Easing.OutQuint);
|
this.ResizeHeightTo(height, 500, Easing.OutQuint);
|
||||||
|
@ -17,7 +17,7 @@ namespace osu.Game.Screens.Play.HUD
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public abstract class HealthDisplay : CompositeDrawable
|
public abstract class HealthDisplay : CompositeDrawable
|
||||||
{
|
{
|
||||||
private readonly Bindable<bool> showHealthbar = new Bindable<bool>(true);
|
private readonly Bindable<bool> showHealthBar = new Bindable<bool>(true);
|
||||||
|
|
||||||
[Resolved]
|
[Resolved]
|
||||||
protected HealthProcessor HealthProcessor { get; private set; }
|
protected HealthProcessor HealthProcessor { get; private set; }
|
||||||
@ -43,10 +43,10 @@ namespace osu.Game.Screens.Play.HUD
|
|||||||
HealthProcessor.NewJudgement += onNewJudgement;
|
HealthProcessor.NewJudgement += onNewJudgement;
|
||||||
|
|
||||||
if (hudOverlay != null)
|
if (hudOverlay != null)
|
||||||
showHealthbar.BindTo(hudOverlay.ShowHealthbar);
|
showHealthBar.BindTo(hudOverlay.ShowHealthBar);
|
||||||
|
|
||||||
// this probably shouldn't be operating on `this.`
|
// this probably shouldn't be operating on `this.`
|
||||||
showHealthbar.BindValueChanged(healthBar => this.FadeTo(healthBar.NewValue ? 1 : 0, HUDOverlay.FADE_DURATION, HUDOverlay.FADE_EASING), true);
|
showHealthBar.BindValueChanged(healthBar => this.FadeTo(healthBar.NewValue ? 1 : 0, HUDOverlay.FADE_DURATION, HUDOverlay.FADE_EASING), true);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void onNewJudgement(JudgementResult judgement)
|
private void onNewJudgement(JudgementResult judgement)
|
||||||
|
@ -46,7 +46,7 @@ namespace osu.Game.Screens.Play
|
|||||||
public readonly HoldForMenuButton HoldToQuit;
|
public readonly HoldForMenuButton HoldToQuit;
|
||||||
public readonly PlayerSettingsOverlay PlayerSettingsOverlay;
|
public readonly PlayerSettingsOverlay PlayerSettingsOverlay;
|
||||||
|
|
||||||
public Bindable<bool> ShowHealthbar = new Bindable<bool>(true);
|
public Bindable<bool> ShowHealthBar = new Bindable<bool>(true);
|
||||||
|
|
||||||
private readonly DrawableRuleset drawableRuleset;
|
private readonly DrawableRuleset drawableRuleset;
|
||||||
private readonly IReadOnlyList<Mod> mods;
|
private readonly IReadOnlyList<Mod> mods;
|
||||||
@ -258,7 +258,7 @@ namespace osu.Game.Screens.Play
|
|||||||
|
|
||||||
protected FailingLayer CreateFailingLayer() => new FailingLayer
|
protected FailingLayer CreateFailingLayer() => new FailingLayer
|
||||||
{
|
{
|
||||||
ShowHealth = { BindTarget = ShowHealthbar }
|
ShowHealth = { BindTarget = ShowHealthBar }
|
||||||
};
|
};
|
||||||
|
|
||||||
protected KeyCounterDisplay CreateKeyCounter() => new KeyCounterDisplay
|
protected KeyCounterDisplay CreateKeyCounter() => new KeyCounterDisplay
|
||||||
|
@ -15,12 +15,12 @@ namespace osu.Game.Screens.Play.PlayerSettings
|
|||||||
{
|
{
|
||||||
public OsuSliderBar<T> Bar => (OsuSliderBar<T>)Control;
|
public OsuSliderBar<T> Bar => (OsuSliderBar<T>)Control;
|
||||||
|
|
||||||
protected override Drawable CreateControl() => new Sliderbar
|
protected override Drawable CreateControl() => new SliderBar
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.X
|
RelativeSizeAxes = Axes.X
|
||||||
};
|
};
|
||||||
|
|
||||||
private class Sliderbar : OsuSliderBar<T>
|
private class SliderBar : OsuSliderBar<T>
|
||||||
{
|
{
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(OsuColour colours)
|
private void load(OsuColour colours)
|
||||||
|
Loading…
Reference in New Issue
Block a user