mirror of
https://github.com/ppy/osu.git
synced 2025-03-28 09:37:23 +08:00
Merge branch 'localisation-base' of https://github.com/kj415j45/osu into localisation-base
This commit is contained in:
commit
0183564810
@ -23,7 +23,7 @@ We are accepting bug reports (please report with as much detail as possible and
|
|||||||
|
|
||||||
- Detailed release changelogs are available on the [official osu! site](https://osu.ppy.sh/home/changelog/lazer).
|
- Detailed release changelogs are available on the [official osu! site](https://osu.ppy.sh/home/changelog/lazer).
|
||||||
- You can learn more about our approach to [project management](https://github.com/ppy/osu/wiki/Project-management).
|
- You can learn more about our approach to [project management](https://github.com/ppy/osu/wiki/Project-management).
|
||||||
- Read peppy's [latest blog post](https://blog.ppy.sh/a-definitive-lazer-faq/) exploring where the project is currently and the roadmap going forward.
|
- Read peppy's [blog post](https://blog.ppy.sh/a-definitive-lazer-faq/) exploring where the project is currently and the roadmap going forward.
|
||||||
|
|
||||||
## Running osu!
|
## Running osu!
|
||||||
|
|
||||||
|
@ -52,7 +52,7 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="ppy.osu.Game.Resources" Version="2021.706.0" />
|
<PackageReference Include="ppy.osu.Game.Resources" Version="2021.706.0" />
|
||||||
<PackageReference Include="ppy.osu.Framework.Android" Version="2021.713.0" />
|
<PackageReference Include="ppy.osu.Framework.Android" Version="2021.714.0" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup Label="Transitive Dependencies">
|
<ItemGroup Label="Transitive Dependencies">
|
||||||
<!-- Realm needs to be directly referenced in all Xamarin projects, as it will not pull in its transitive dependencies otherwise. -->
|
<!-- Realm needs to be directly referenced in all Xamarin projects, as it will not pull in its transitive dependencies otherwise. -->
|
||||||
|
@ -13,7 +13,7 @@ namespace osu.Game.Rulesets.Mania
|
|||||||
{
|
{
|
||||||
public class ManiaSettingsSubsection : RulesetSettingsSubsection
|
public class ManiaSettingsSubsection : RulesetSettingsSubsection
|
||||||
{
|
{
|
||||||
protected override string Header => "osu!mania";
|
protected override LocalisableString Header => "osu!mania";
|
||||||
|
|
||||||
public ManiaSettingsSubsection(ManiaRuleset ruleset)
|
public ManiaSettingsSubsection(ManiaRuleset ruleset)
|
||||||
: base(ruleset)
|
: base(ruleset)
|
||||||
|
@ -22,6 +22,10 @@ namespace osu.Game.Rulesets.Mania.Objects.Drawables
|
|||||||
|
|
||||||
protected readonly IBindable<ScrollingDirection> Direction = new Bindable<ScrollingDirection>();
|
protected readonly IBindable<ScrollingDirection> Direction = new Bindable<ScrollingDirection>();
|
||||||
|
|
||||||
|
// Leaving the default (10s) makes hitobjects not appear, as this offset is used for the initial state transforms.
|
||||||
|
// Calculated as DrawableManiaRuleset.MAX_TIME_RANGE + some additional allowance for velocity < 1.
|
||||||
|
protected override double InitialLifetimeOffset => 30000;
|
||||||
|
|
||||||
[Resolved(canBeNull: true)]
|
[Resolved(canBeNull: true)]
|
||||||
private ManiaPlayfield playfield { get; set; }
|
private ManiaPlayfield playfield { get; set; }
|
||||||
|
|
||||||
|
@ -33,12 +33,12 @@ namespace osu.Game.Rulesets.Mania.UI
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// The minimum time range. This occurs at a <see cref="relativeTimeRange"/> of 40.
|
/// The minimum time range. This occurs at a <see cref="relativeTimeRange"/> of 40.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public const double MIN_TIME_RANGE = 340;
|
public const double MIN_TIME_RANGE = 290;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The maximum time range. This occurs at a <see cref="relativeTimeRange"/> of 1.
|
/// The maximum time range. This occurs at a <see cref="relativeTimeRange"/> of 1.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public const double MAX_TIME_RANGE = 13720;
|
public const double MAX_TIME_RANGE = 11485;
|
||||||
|
|
||||||
protected new ManiaPlayfield Playfield => (ManiaPlayfield)base.Playfield;
|
protected new ManiaPlayfield Playfield => (ManiaPlayfield)base.Playfield;
|
||||||
|
|
||||||
@ -67,7 +67,7 @@ namespace osu.Game.Rulesets.Mania.UI
|
|||||||
protected override ScrollVisualisationMethod VisualisationMethod => scrollMethod;
|
protected override ScrollVisualisationMethod VisualisationMethod => scrollMethod;
|
||||||
|
|
||||||
private readonly Bindable<ManiaScrollingDirection> configDirection = new Bindable<ManiaScrollingDirection>();
|
private readonly Bindable<ManiaScrollingDirection> configDirection = new Bindable<ManiaScrollingDirection>();
|
||||||
private readonly Bindable<double> configTimeRange = new BindableDouble();
|
private readonly BindableDouble configTimeRange = new BindableDouble();
|
||||||
|
|
||||||
// Stores the current speed adjustment active in gameplay.
|
// Stores the current speed adjustment active in gameplay.
|
||||||
private readonly Track speedAdjustmentTrack = new TrackVirtual(0);
|
private readonly Track speedAdjustmentTrack = new TrackVirtual(0);
|
||||||
@ -103,6 +103,8 @@ namespace osu.Game.Rulesets.Mania.UI
|
|||||||
configDirection.BindValueChanged(direction => Direction.Value = (ScrollingDirection)direction.NewValue, true);
|
configDirection.BindValueChanged(direction => Direction.Value = (ScrollingDirection)direction.NewValue, true);
|
||||||
|
|
||||||
Config.BindWith(ManiaRulesetSetting.ScrollTime, configTimeRange);
|
Config.BindWith(ManiaRulesetSetting.ScrollTime, configTimeRange);
|
||||||
|
TimeRange.MinValue = configTimeRange.MinValue;
|
||||||
|
TimeRange.MaxValue = configTimeRange.MaxValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void AdjustScrollSpeed(int amount)
|
protected override void AdjustScrollSpeed(int amount)
|
||||||
|
@ -98,11 +98,13 @@ namespace osu.Game.Rulesets.Osu.Difficulty
|
|||||||
|
|
||||||
double approachRateFactor = 0.0;
|
double approachRateFactor = 0.0;
|
||||||
if (Attributes.ApproachRate > 10.33)
|
if (Attributes.ApproachRate > 10.33)
|
||||||
approachRateFactor += 0.4 * (Attributes.ApproachRate - 10.33);
|
approachRateFactor = Attributes.ApproachRate - 10.33;
|
||||||
else if (Attributes.ApproachRate < 8.0)
|
else if (Attributes.ApproachRate < 8.0)
|
||||||
approachRateFactor += 0.01 * (8.0 - Attributes.ApproachRate);
|
approachRateFactor = 0.025 * (8.0 - Attributes.ApproachRate);
|
||||||
|
|
||||||
aimValue *= 1.0 + Math.Min(approachRateFactor, approachRateFactor * (totalHits / 1000.0));
|
double approachRateTotalHitsFactor = 1.0 / (1.0 + Math.Exp(-(0.007 * (totalHits - 400))));
|
||||||
|
|
||||||
|
aimValue *= 1.0 + (0.03 + 0.37 * approachRateTotalHitsFactor) * approachRateFactor;
|
||||||
|
|
||||||
// We want to give more reward for lower AR when it comes to aim and HD. This nerfs high AR and buffs lower AR.
|
// We want to give more reward for lower AR when it comes to aim and HD. This nerfs high AR and buffs lower AR.
|
||||||
if (mods.Any(h => h is OsuModHidden))
|
if (mods.Any(h => h is OsuModHidden))
|
||||||
@ -145,9 +147,11 @@ namespace osu.Game.Rulesets.Osu.Difficulty
|
|||||||
|
|
||||||
double approachRateFactor = 0.0;
|
double approachRateFactor = 0.0;
|
||||||
if (Attributes.ApproachRate > 10.33)
|
if (Attributes.ApproachRate > 10.33)
|
||||||
approachRateFactor += 0.4 * (Attributes.ApproachRate - 10.33);
|
approachRateFactor = Attributes.ApproachRate - 10.33;
|
||||||
|
|
||||||
speedValue *= 1.0 + Math.Min(approachRateFactor, approachRateFactor * (totalHits / 1000.0));
|
double approachRateTotalHitsFactor = 1.0 / (1.0 + Math.Exp(-(0.007 * (totalHits - 400))));
|
||||||
|
|
||||||
|
speedValue *= 1.0 + (0.03 + 0.37 * approachRateTotalHitsFactor) * approachRateFactor;
|
||||||
|
|
||||||
if (mods.Any(m => m is OsuModHidden))
|
if (mods.Any(m => m is OsuModHidden))
|
||||||
speedValue *= 1.0 + 0.04 * (12.0 - Attributes.ApproachRate);
|
speedValue *= 1.0 + 0.04 * (12.0 - Attributes.ApproachRate);
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
|
|
||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
|
using osu.Framework.Localisation;
|
||||||
using osu.Game.Overlays.Settings;
|
using osu.Game.Overlays.Settings;
|
||||||
using osu.Game.Rulesets.Osu.Configuration;
|
using osu.Game.Rulesets.Osu.Configuration;
|
||||||
using osu.Game.Rulesets.UI;
|
using osu.Game.Rulesets.UI;
|
||||||
@ -11,7 +12,7 @@ namespace osu.Game.Rulesets.Osu.UI
|
|||||||
{
|
{
|
||||||
public class OsuSettingsSubsection : RulesetSettingsSubsection
|
public class OsuSettingsSubsection : RulesetSettingsSubsection
|
||||||
{
|
{
|
||||||
protected override string Header => "osu!";
|
protected override LocalisableString Header => "osu!";
|
||||||
|
|
||||||
public OsuSettingsSubsection(Ruleset ruleset)
|
public OsuSettingsSubsection(Ruleset ruleset)
|
||||||
: base(ruleset)
|
: base(ruleset)
|
||||||
|
103
osu.Game.Tests/Visual/UserInterface/TestSceneOsuPopover.cs
Normal file
103
osu.Game.Tests/Visual/UserInterface/TestSceneOsuPopover.cs
Normal file
@ -0,0 +1,103 @@
|
|||||||
|
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||||
|
// See the LICENCE file in the repository root for full licence text.
|
||||||
|
|
||||||
|
using osu.Framework.Allocation;
|
||||||
|
using osu.Framework.Extensions;
|
||||||
|
using osu.Framework.Graphics;
|
||||||
|
using osu.Framework.Graphics.Containers;
|
||||||
|
using osu.Framework.Graphics.Cursor;
|
||||||
|
using osu.Framework.Graphics.UserInterface;
|
||||||
|
using osu.Game.Graphics;
|
||||||
|
using osu.Game.Graphics.Sprites;
|
||||||
|
using osu.Game.Graphics.UserInterface;
|
||||||
|
using osu.Game.Graphics.UserInterfaceV2;
|
||||||
|
using osu.Game.Overlays;
|
||||||
|
using osuTK;
|
||||||
|
|
||||||
|
namespace osu.Game.Tests.Visual.UserInterface
|
||||||
|
{
|
||||||
|
public class TestSceneOsuPopover : OsuGridTestScene
|
||||||
|
{
|
||||||
|
public TestSceneOsuPopover()
|
||||||
|
: base(1, 2)
|
||||||
|
{
|
||||||
|
Cell(0, 0).Child = new PopoverContainer
|
||||||
|
{
|
||||||
|
RelativeSizeAxes = Axes.Both,
|
||||||
|
Children = new Drawable[]
|
||||||
|
{
|
||||||
|
new OsuSpriteText
|
||||||
|
{
|
||||||
|
Text = @"No OverlayColourProvider",
|
||||||
|
Font = OsuFont.Default.With(size: 40)
|
||||||
|
},
|
||||||
|
new TriangleButtonWithPopover()
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
Cell(0, 1).Child = new ColourProvidingContainer(OverlayColourScheme.Orange)
|
||||||
|
{
|
||||||
|
RelativeSizeAxes = Axes.Both,
|
||||||
|
Child = new PopoverContainer
|
||||||
|
{
|
||||||
|
RelativeSizeAxes = Axes.Both,
|
||||||
|
Children = new Drawable[]
|
||||||
|
{
|
||||||
|
new OsuSpriteText
|
||||||
|
{
|
||||||
|
Text = @"With OverlayColourProvider (orange)",
|
||||||
|
Font = OsuFont.Default.With(size: 40)
|
||||||
|
},
|
||||||
|
new TriangleButtonWithPopover()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
private class TriangleButtonWithPopover : TriangleButton, IHasPopover
|
||||||
|
{
|
||||||
|
public TriangleButtonWithPopover()
|
||||||
|
{
|
||||||
|
Width = 100;
|
||||||
|
Height = 30;
|
||||||
|
Anchor = Anchor.Centre;
|
||||||
|
Origin = Anchor.Centre;
|
||||||
|
Text = @"open";
|
||||||
|
Action = this.ShowPopover;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Popover GetPopover() => new OsuPopover
|
||||||
|
{
|
||||||
|
Child = new FillFlowContainer
|
||||||
|
{
|
||||||
|
AutoSizeAxes = Axes.Both,
|
||||||
|
Direction = FillDirection.Vertical,
|
||||||
|
Spacing = new Vector2(10),
|
||||||
|
Children = new Drawable[]
|
||||||
|
{
|
||||||
|
new OsuSpriteText
|
||||||
|
{
|
||||||
|
Text = @"sample text"
|
||||||
|
},
|
||||||
|
new OsuTextBox
|
||||||
|
{
|
||||||
|
Width = 150,
|
||||||
|
Height = 30
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
private class ColourProvidingContainer : Container
|
||||||
|
{
|
||||||
|
[Cached]
|
||||||
|
private OverlayColourProvider provider { get; }
|
||||||
|
|
||||||
|
public ColourProvidingContainer(OverlayColourScheme colourScheme)
|
||||||
|
{
|
||||||
|
provider = new OverlayColourProvider(colourScheme);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -28,6 +28,12 @@ namespace osu.Game.Tournament.Tests.Screens
|
|||||||
setMatchDate(TimeSpan.FromHours(3));
|
setMatchDate(TimeSpan.FromHours(3));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
public void TestNoCurrentMatch()
|
||||||
|
{
|
||||||
|
AddStep("Set null current match", () => Ladder.CurrentMatch.Value = null);
|
||||||
|
}
|
||||||
|
|
||||||
private void setMatchDate(TimeSpan relativeTime)
|
private void setMatchDate(TimeSpan relativeTime)
|
||||||
// Humanizer cannot handle negative timespans.
|
// Humanizer cannot handle negative timespans.
|
||||||
=> AddStep($"start time is {relativeTime}", () =>
|
=> AddStep($"start time is {relativeTime}", () =>
|
||||||
|
@ -303,6 +303,15 @@ namespace osu.Game.Tournament.Screens.Ladder.Components
|
|||||||
Match.LosersProgression.Value = null;
|
Match.LosersProgression.Value = null;
|
||||||
|
|
||||||
ladderInfo.Matches.Remove(Match);
|
ladderInfo.Matches.Remove(Match);
|
||||||
|
|
||||||
|
foreach (var m in ladderInfo.Matches)
|
||||||
|
{
|
||||||
|
if (m.Progression.Value == Match)
|
||||||
|
m.Progression.Value = null;
|
||||||
|
|
||||||
|
if (m.LosersProgression.Value == Match)
|
||||||
|
m.LosersProgression.Value = null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -96,19 +96,18 @@ namespace osu.Game.Tournament.Screens.Schedule
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void LoadComplete()
|
||||||
|
{
|
||||||
|
base.LoadComplete();
|
||||||
|
|
||||||
currentMatch.BindValueChanged(matchChanged);
|
|
||||||
currentMatch.BindTo(ladder.CurrentMatch);
|
currentMatch.BindTo(ladder.CurrentMatch);
|
||||||
|
currentMatch.BindValueChanged(matchChanged, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void matchChanged(ValueChangedEvent<TournamentMatch> match)
|
private void matchChanged(ValueChangedEvent<TournamentMatch> match)
|
||||||
{
|
{
|
||||||
if (match.NewValue == null)
|
|
||||||
{
|
|
||||||
mainContainer.Clear();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
var upcoming = ladder.Matches.Where(p => !p.Completed.Value && p.Team1.Value != null && p.Team2.Value != null && Math.Abs(p.Date.Value.DayOfYear - DateTimeOffset.UtcNow.DayOfYear) < 4);
|
var upcoming = ladder.Matches.Where(p => !p.Completed.Value && p.Team1.Value != null && p.Team2.Value != null && Math.Abs(p.Date.Value.DayOfYear - DateTimeOffset.UtcNow.DayOfYear) < 4);
|
||||||
var conditionals = ladder
|
var conditionals = ladder
|
||||||
.Matches.Where(p => !p.Completed.Value && (p.Team1.Value == null || p.Team2.Value == null) && Math.Abs(p.Date.Value.DayOfYear - DateTimeOffset.UtcNow.DayOfYear) < 4)
|
.Matches.Where(p => !p.Completed.Value && (p.Team1.Value == null || p.Team2.Value == null) && Math.Abs(p.Date.Value.DayOfYear - DateTimeOffset.UtcNow.DayOfYear) < 4)
|
||||||
@ -117,6 +116,8 @@ namespace osu.Game.Tournament.Screens.Schedule
|
|||||||
upcoming = upcoming.Concat(conditionals);
|
upcoming = upcoming.Concat(conditionals);
|
||||||
upcoming = upcoming.OrderBy(p => p.Date.Value).Take(8);
|
upcoming = upcoming.OrderBy(p => p.Date.Value).Take(8);
|
||||||
|
|
||||||
|
ScheduleContainer comingUpNext;
|
||||||
|
|
||||||
mainContainer.Child = new FillFlowContainer
|
mainContainer.Child = new FillFlowContainer
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
@ -153,57 +154,58 @@ namespace osu.Game.Tournament.Screens.Schedule
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
new ScheduleContainer("coming up next")
|
comingUpNext = new ScheduleContainer("coming up next")
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
Height = 0.25f,
|
Height = 0.25f,
|
||||||
Children = new Drawable[]
|
|
||||||
{
|
|
||||||
new FillFlowContainer
|
|
||||||
{
|
|
||||||
AutoSizeAxes = Axes.Both,
|
|
||||||
Direction = FillDirection.Horizontal,
|
|
||||||
Spacing = new Vector2(30),
|
|
||||||
Children = new Drawable[]
|
|
||||||
{
|
|
||||||
new ScheduleMatch(match.NewValue, false)
|
|
||||||
{
|
|
||||||
Anchor = Anchor.CentreLeft,
|
|
||||||
Origin = Anchor.CentreLeft,
|
|
||||||
},
|
|
||||||
new TournamentSpriteTextWithBackground(match.NewValue.Round.Value?.Name.Value)
|
|
||||||
{
|
|
||||||
Anchor = Anchor.CentreLeft,
|
|
||||||
Origin = Anchor.CentreLeft,
|
|
||||||
Scale = new Vector2(0.5f)
|
|
||||||
},
|
|
||||||
new TournamentSpriteText
|
|
||||||
{
|
|
||||||
Anchor = Anchor.CentreLeft,
|
|
||||||
Origin = Anchor.CentreLeft,
|
|
||||||
Text = match.NewValue.Team1.Value?.FullName + " vs " + match.NewValue.Team2.Value?.FullName,
|
|
||||||
Font = OsuFont.Torus.With(size: 24, weight: FontWeight.SemiBold)
|
|
||||||
},
|
|
||||||
new FillFlowContainer
|
|
||||||
{
|
|
||||||
AutoSizeAxes = Axes.Both,
|
|
||||||
Direction = FillDirection.Horizontal,
|
|
||||||
Anchor = Anchor.CentreLeft,
|
|
||||||
Origin = Anchor.CentreLeft,
|
|
||||||
Children = new Drawable[]
|
|
||||||
{
|
|
||||||
new ScheduleMatchDate(match.NewValue.Date.Value)
|
|
||||||
{
|
|
||||||
Font = OsuFont.Torus.With(size: 24, weight: FontWeight.Regular)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
}
|
|
||||||
},
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
if (match.NewValue != null)
|
||||||
|
{
|
||||||
|
comingUpNext.Child = new FillFlowContainer
|
||||||
|
{
|
||||||
|
AutoSizeAxes = Axes.Both,
|
||||||
|
Direction = FillDirection.Horizontal,
|
||||||
|
Spacing = new Vector2(30),
|
||||||
|
Children = new Drawable[]
|
||||||
|
{
|
||||||
|
new ScheduleMatch(match.NewValue, false)
|
||||||
|
{
|
||||||
|
Anchor = Anchor.CentreLeft,
|
||||||
|
Origin = Anchor.CentreLeft,
|
||||||
|
},
|
||||||
|
new TournamentSpriteTextWithBackground(match.NewValue.Round.Value?.Name.Value)
|
||||||
|
{
|
||||||
|
Anchor = Anchor.CentreLeft,
|
||||||
|
Origin = Anchor.CentreLeft,
|
||||||
|
Scale = new Vector2(0.5f)
|
||||||
|
},
|
||||||
|
new TournamentSpriteText
|
||||||
|
{
|
||||||
|
Anchor = Anchor.CentreLeft,
|
||||||
|
Origin = Anchor.CentreLeft,
|
||||||
|
Text = match.NewValue.Team1.Value?.FullName + " vs " + match.NewValue.Team2.Value?.FullName,
|
||||||
|
Font = OsuFont.Torus.With(size: 24, weight: FontWeight.SemiBold)
|
||||||
|
},
|
||||||
|
new FillFlowContainer
|
||||||
|
{
|
||||||
|
AutoSizeAxes = Axes.Both,
|
||||||
|
Direction = FillDirection.Horizontal,
|
||||||
|
Anchor = Anchor.CentreLeft,
|
||||||
|
Origin = Anchor.CentreLeft,
|
||||||
|
Children = new Drawable[]
|
||||||
|
{
|
||||||
|
new ScheduleMatchDate(match.NewValue.Date.Value)
|
||||||
|
{
|
||||||
|
Font = OsuFont.Torus.With(size: 24, weight: FontWeight.Regular)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public class ScheduleMatch : DrawableTournamentMatch
|
public class ScheduleMatch : DrawableTournamentMatch
|
||||||
|
55
osu.Game/Graphics/UserInterfaceV2/OsuPopover.cs
Normal file
55
osu.Game/Graphics/UserInterfaceV2/OsuPopover.cs
Normal file
@ -0,0 +1,55 @@
|
|||||||
|
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||||
|
// See the LICENCE file in the repository root for full licence text.
|
||||||
|
|
||||||
|
using JetBrains.Annotations;
|
||||||
|
using osu.Framework.Allocation;
|
||||||
|
using osu.Framework.Graphics;
|
||||||
|
using osu.Framework.Graphics.Effects;
|
||||||
|
using osu.Framework.Graphics.UserInterface;
|
||||||
|
using osu.Game.Overlays;
|
||||||
|
using osuTK;
|
||||||
|
|
||||||
|
namespace osu.Game.Graphics.UserInterfaceV2
|
||||||
|
{
|
||||||
|
public class OsuPopover : Popover
|
||||||
|
{
|
||||||
|
private const float fade_duration = 250;
|
||||||
|
private const double scale_duration = 500;
|
||||||
|
|
||||||
|
public OsuPopover(bool withPadding = true)
|
||||||
|
{
|
||||||
|
Content.Padding = withPadding ? new MarginPadding(20) : new MarginPadding();
|
||||||
|
|
||||||
|
Body.Masking = true;
|
||||||
|
Body.CornerRadius = 10;
|
||||||
|
Body.Margin = new MarginPadding(10);
|
||||||
|
Body.EdgeEffect = new EdgeEffectParameters
|
||||||
|
{
|
||||||
|
Type = EdgeEffectType.Shadow,
|
||||||
|
Offset = new Vector2(0, 2),
|
||||||
|
Radius = 5,
|
||||||
|
Colour = Colour4.Black.Opacity(0.3f)
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
[BackgroundDependencyLoader(true)]
|
||||||
|
private void load([CanBeNull] OverlayColourProvider colourProvider, OsuColour colours)
|
||||||
|
{
|
||||||
|
Background.Colour = Arrow.Colour = colourProvider?.Background4 ?? colours.GreySeafoamDarker;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override Drawable CreateArrow() => Empty();
|
||||||
|
|
||||||
|
protected override void PopIn()
|
||||||
|
{
|
||||||
|
this.ScaleTo(1, scale_duration, Easing.OutElasticHalf);
|
||||||
|
this.FadeIn(fade_duration, Easing.OutQuint);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void PopOut()
|
||||||
|
{
|
||||||
|
this.ScaleTo(0.7f, scale_duration, Easing.OutQuint);
|
||||||
|
this.FadeOut(fade_duration, Easing.OutQuint);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
29
osu.Game/Localisation/BindingSettingsStrings.cs
Normal file
29
osu.Game/Localisation/BindingSettingsStrings.cs
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||||
|
// See the LICENCE file in the repository root for full licence text.
|
||||||
|
|
||||||
|
using osu.Framework.Localisation;
|
||||||
|
|
||||||
|
namespace osu.Game.Localisation
|
||||||
|
{
|
||||||
|
public static class BindingSettingsStrings
|
||||||
|
{
|
||||||
|
private const string prefix = @"osu.Game.Resources.Localisation.BindingSettings";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// "Shortcut and gameplay bindings"
|
||||||
|
/// </summary>
|
||||||
|
public static LocalisableString ShortcutAndGameplayBindings => new TranslatableString(getKey(@"shortcut_and_gameplay_bindings"), @"Shortcut and gameplay bindings");
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// "Configure"
|
||||||
|
/// </summary>
|
||||||
|
public static LocalisableString Configure => new TranslatableString(getKey(@"configure"), @"Configure");
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// "change global shortcut keys and gameplay bindings"
|
||||||
|
/// </summary>
|
||||||
|
public static LocalisableString ChangeBindingsButton => new TranslatableString(getKey(@"change_bindings_button"), @"change global shortcut keys and gameplay bindings");
|
||||||
|
|
||||||
|
private static string getKey(string key) => $@"{prefix}:{key}";
|
||||||
|
}
|
||||||
|
}
|
@ -14,6 +14,21 @@ namespace osu.Game.Localisation
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public static LocalisableString Cancel => new TranslatableString(getKey(@"cancel"), @"Cancel");
|
public static LocalisableString Cancel => new TranslatableString(getKey(@"cancel"), @"Cancel");
|
||||||
|
|
||||||
private static string getKey(string key) => $"{prefix}:{key}";
|
/// <summary>
|
||||||
|
/// "Enabled"
|
||||||
|
/// </summary>
|
||||||
|
public static LocalisableString Enabled => new TranslatableString(getKey(@"enabled"), @"Enabled");
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// "Width"
|
||||||
|
/// </summary>
|
||||||
|
public static LocalisableString Width => new TranslatableString(getKey(@"width"), @"Width");
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// "Height"
|
||||||
|
/// </summary>
|
||||||
|
public static LocalisableString Height => new TranslatableString(getKey(@"height"), @"Height");
|
||||||
|
|
||||||
|
private static string getKey(string key) => $@"{prefix}:{key}";
|
||||||
}
|
}
|
||||||
}
|
}
|
59
osu.Game/Localisation/MouseSettingsStrings.cs
Normal file
59
osu.Game/Localisation/MouseSettingsStrings.cs
Normal file
@ -0,0 +1,59 @@
|
|||||||
|
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||||
|
// See the LICENCE file in the repository root for full licence text.
|
||||||
|
|
||||||
|
using osu.Framework.Localisation;
|
||||||
|
|
||||||
|
namespace osu.Game.Localisation
|
||||||
|
{
|
||||||
|
public static class MouseSettingsStrings
|
||||||
|
{
|
||||||
|
private const string prefix = @"osu.Game.Resources.Localisation.MouseSettings";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// "Mouse"
|
||||||
|
/// </summary>
|
||||||
|
public static LocalisableString Mouse => new TranslatableString(getKey(@"mouse"), @"Mouse");
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// "Not applicable in full screen mode"
|
||||||
|
/// </summary>
|
||||||
|
public static LocalisableString NotApplicableFullscreen => new TranslatableString(getKey(@"not_applicable_full_screen"), @"Not applicable in full screen mode");
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// "High precision mouse"
|
||||||
|
/// </summary>
|
||||||
|
public static LocalisableString HighPrecisionMouse => new TranslatableString(getKey(@"high_precision_mouse"), @"High precision mouse");
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// "Attempts to bypass any operation system mouse acceleration. On windows, this is equivalent to what used to be known as "Raw Input"."
|
||||||
|
/// </summary>
|
||||||
|
public static LocalisableString HighPrecisionMouseTooltip => new TranslatableString(getKey(@"high_precision_mouse_tooltip"), @"Attempts to bypass any operation system mouse acceleration. On windows, this is equivalent to what used to be known as ""Raw Input"".");
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// "Confine mouse cursor to window"
|
||||||
|
/// </summary>
|
||||||
|
public static LocalisableString ConfineMouseMode => new TranslatableString(getKey(@"confine_mouse_mode"), @"Confine mouse cursor to window");
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// "Disable mouse wheel during gameplay"
|
||||||
|
/// </summary>
|
||||||
|
public static LocalisableString DisableMouseWheel => new TranslatableString(getKey(@"disable_mouse_wheel"), @"Disable mouse wheel during gameplay");
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// "Disable mouse buttons during gameplay"
|
||||||
|
/// </summary>
|
||||||
|
public static LocalisableString DisableMouseButtons => new TranslatableString(getKey(@"disable_mouse_buttons"), @"Disable mouse buttons during gameplay");
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// "Enable high precision mouse to adjust sensitivity"
|
||||||
|
/// </summary>
|
||||||
|
public static LocalisableString EnableHighPrecisionForSensitivityAdjust => new TranslatableString(getKey(@"enable_high_precision_for_sensitivity_adjust"), @"Enable high precision mouse to adjust sensitivity");
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// "Cursor sensitivity"
|
||||||
|
/// </summary>
|
||||||
|
public static LocalisableString CursorSensitivity => new TranslatableString(getKey(@"cursor_sensitivity"), @"Cursor sensitivity");
|
||||||
|
|
||||||
|
private static string getKey(string key) => $@"{prefix}:{key}";
|
||||||
|
}
|
||||||
|
}
|
59
osu.Game/Localisation/TabletSettingsStrings.cs
Normal file
59
osu.Game/Localisation/TabletSettingsStrings.cs
Normal file
@ -0,0 +1,59 @@
|
|||||||
|
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||||
|
// See the LICENCE file in the repository root for full licence text.
|
||||||
|
|
||||||
|
using osu.Framework.Localisation;
|
||||||
|
|
||||||
|
namespace osu.Game.Localisation
|
||||||
|
{
|
||||||
|
public static class TabletSettingsStrings
|
||||||
|
{
|
||||||
|
private const string prefix = @"osu.Game.Resources.Localisation.TabletSettings";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// "Tablet"
|
||||||
|
/// </summary>
|
||||||
|
public static LocalisableString Tablet => new TranslatableString(getKey(@"tablet"), @"Tablet");
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// "No tablet detected!"
|
||||||
|
/// </summary>
|
||||||
|
public static LocalisableString NoTabletDetected => new TranslatableString(getKey(@"no_tablet_detected"), @"No tablet detected!");
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// "Reset to full area"
|
||||||
|
/// </summary>
|
||||||
|
public static LocalisableString ResetToFullArea => new TranslatableString(getKey(@"reset_to_full_area"), @"Reset to full area");
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// "Conform to current game aspect ratio"
|
||||||
|
/// </summary>
|
||||||
|
public static LocalisableString ConformToCurrentGameAspectRatio => new TranslatableString(getKey(@"conform_to_current_game_aspect_ratio"), @"Conform to current game aspect ratio");
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// "X Offset"
|
||||||
|
/// </summary>
|
||||||
|
public static LocalisableString XOffset => new TranslatableString(getKey(@"x_offset"), @"X Offset");
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// "Y Offset"
|
||||||
|
/// </summary>
|
||||||
|
public static LocalisableString YOffset => new TranslatableString(getKey(@"y_offset"), @"Y Offset");
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// "Rotation"
|
||||||
|
/// </summary>
|
||||||
|
public static LocalisableString Rotation => new TranslatableString(getKey(@"rotation"), @"Rotation");
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// "Aspect Ratio"
|
||||||
|
/// </summary>
|
||||||
|
public static LocalisableString AspectRatio => new TranslatableString(getKey(@"aspect_ratio"), @"Aspect Ratio");
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// "Lock aspect ratio"
|
||||||
|
/// </summary>
|
||||||
|
public static LocalisableString LockAspectRatio => new TranslatableString(getKey(@"lock_aspect_ratio"), @"Lock aspect ratio");
|
||||||
|
|
||||||
|
private static string getKey(string key) => $@"{prefix}:{key}";
|
||||||
|
}
|
||||||
|
}
|
@ -3,6 +3,7 @@
|
|||||||
|
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Framework.Graphics.Sprites;
|
using osu.Framework.Graphics.Sprites;
|
||||||
|
using osu.Framework.Localisation;
|
||||||
using osu.Game.Input.Bindings;
|
using osu.Game.Input.Bindings;
|
||||||
using osu.Game.Overlays.Settings;
|
using osu.Game.Overlays.Settings;
|
||||||
|
|
||||||
@ -28,7 +29,7 @@ namespace osu.Game.Overlays.KeyBinding
|
|||||||
|
|
||||||
private class DefaultBindingsSubsection : KeyBindingsSubsection
|
private class DefaultBindingsSubsection : KeyBindingsSubsection
|
||||||
{
|
{
|
||||||
protected override string Header => string.Empty;
|
protected override LocalisableString Header => string.Empty;
|
||||||
|
|
||||||
public DefaultBindingsSubsection(GlobalActionContainer manager)
|
public DefaultBindingsSubsection(GlobalActionContainer manager)
|
||||||
: base(null)
|
: base(null)
|
||||||
@ -39,7 +40,7 @@ namespace osu.Game.Overlays.KeyBinding
|
|||||||
|
|
||||||
private class SongSelectKeyBindingSubsection : KeyBindingsSubsection
|
private class SongSelectKeyBindingSubsection : KeyBindingsSubsection
|
||||||
{
|
{
|
||||||
protected override string Header => "Song Select";
|
protected override LocalisableString Header => "Song Select";
|
||||||
|
|
||||||
public SongSelectKeyBindingSubsection(GlobalActionContainer manager)
|
public SongSelectKeyBindingSubsection(GlobalActionContainer manager)
|
||||||
: base(null)
|
: base(null)
|
||||||
@ -50,7 +51,7 @@ namespace osu.Game.Overlays.KeyBinding
|
|||||||
|
|
||||||
private class InGameKeyBindingsSubsection : KeyBindingsSubsection
|
private class InGameKeyBindingsSubsection : KeyBindingsSubsection
|
||||||
{
|
{
|
||||||
protected override string Header => "In Game";
|
protected override LocalisableString Header => "In Game";
|
||||||
|
|
||||||
public InGameKeyBindingsSubsection(GlobalActionContainer manager)
|
public InGameKeyBindingsSubsection(GlobalActionContainer manager)
|
||||||
: base(null)
|
: base(null)
|
||||||
@ -61,7 +62,7 @@ namespace osu.Game.Overlays.KeyBinding
|
|||||||
|
|
||||||
private class AudioControlKeyBindingsSubsection : KeyBindingsSubsection
|
private class AudioControlKeyBindingsSubsection : KeyBindingsSubsection
|
||||||
{
|
{
|
||||||
protected override string Header => "Audio";
|
protected override LocalisableString Header => "Audio";
|
||||||
|
|
||||||
public AudioControlKeyBindingsSubsection(GlobalActionContainer manager)
|
public AudioControlKeyBindingsSubsection(GlobalActionContainer manager)
|
||||||
: base(null)
|
: base(null)
|
||||||
@ -72,7 +73,7 @@ namespace osu.Game.Overlays.KeyBinding
|
|||||||
|
|
||||||
private class EditorKeyBindingsSubsection : KeyBindingsSubsection
|
private class EditorKeyBindingsSubsection : KeyBindingsSubsection
|
||||||
{
|
{
|
||||||
protected override string Header => "Editor";
|
protected override LocalisableString Header => "Editor";
|
||||||
|
|
||||||
public EditorKeyBindingsSubsection(GlobalActionContainer manager)
|
public EditorKeyBindingsSubsection(GlobalActionContainer manager)
|
||||||
: base(null)
|
: base(null)
|
||||||
|
@ -1,13 +1,14 @@
|
|||||||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||||
// See the LICENCE file in the repository root for full licence text.
|
// See the LICENCE file in the repository root for full licence text.
|
||||||
|
|
||||||
|
using osu.Framework.Localisation;
|
||||||
using osu.Game.Rulesets;
|
using osu.Game.Rulesets;
|
||||||
|
|
||||||
namespace osu.Game.Overlays.KeyBinding
|
namespace osu.Game.Overlays.KeyBinding
|
||||||
{
|
{
|
||||||
public class VariantBindingsSubsection : KeyBindingsSubsection
|
public class VariantBindingsSubsection : KeyBindingsSubsection
|
||||||
{
|
{
|
||||||
protected override string Header { get; }
|
protected override LocalisableString Header { get; }
|
||||||
|
|
||||||
public VariantBindingsSubsection(RulesetInfo ruleset, int variant)
|
public VariantBindingsSubsection(RulesetInfo ruleset, int variant)
|
||||||
: base(variant)
|
: base(variant)
|
||||||
|
@ -13,7 +13,7 @@ namespace osu.Game.Overlays.Settings.Sections.Audio
|
|||||||
{
|
{
|
||||||
public class AudioDevicesSettings : SettingsSubsection
|
public class AudioDevicesSettings : SettingsSubsection
|
||||||
{
|
{
|
||||||
protected override string Header => "Devices";
|
protected override LocalisableString Header => "Devices";
|
||||||
|
|
||||||
[Resolved]
|
[Resolved]
|
||||||
private AudioManager audio { get; set; }
|
private AudioManager audio { get; set; }
|
||||||
|
@ -11,7 +11,7 @@ namespace osu.Game.Overlays.Settings.Sections.Audio
|
|||||||
{
|
{
|
||||||
public class OffsetSettings : SettingsSubsection
|
public class OffsetSettings : SettingsSubsection
|
||||||
{
|
{
|
||||||
protected override string Header => "Offset Adjustment";
|
protected override LocalisableString Header => "Offset Adjustment";
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(OsuConfigManager config)
|
private void load(OsuConfigManager config)
|
||||||
|
@ -4,13 +4,14 @@
|
|||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
using osu.Framework.Audio;
|
using osu.Framework.Audio;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
|
using osu.Framework.Localisation;
|
||||||
using osu.Game.Configuration;
|
using osu.Game.Configuration;
|
||||||
|
|
||||||
namespace osu.Game.Overlays.Settings.Sections.Audio
|
namespace osu.Game.Overlays.Settings.Sections.Audio
|
||||||
{
|
{
|
||||||
public class VolumeSettings : SettingsSubsection
|
public class VolumeSettings : SettingsSubsection
|
||||||
{
|
{
|
||||||
protected override string Header => "Volume";
|
protected override LocalisableString Header => "Volume";
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(AudioManager audio, OsuConfigManager config)
|
private void load(AudioManager audio, OsuConfigManager config)
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
using osu.Framework.Configuration;
|
using osu.Framework.Configuration;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
|
using osu.Framework.Localisation;
|
||||||
using osu.Framework.Screens;
|
using osu.Framework.Screens;
|
||||||
using osu.Game.Screens.Import;
|
using osu.Game.Screens.Import;
|
||||||
|
|
||||||
@ -11,7 +12,7 @@ namespace osu.Game.Overlays.Settings.Sections.Debug
|
|||||||
{
|
{
|
||||||
public class GeneralSettings : SettingsSubsection
|
public class GeneralSettings : SettingsSubsection
|
||||||
{
|
{
|
||||||
protected override string Header => "General";
|
protected override LocalisableString Header => "General";
|
||||||
|
|
||||||
[BackgroundDependencyLoader(true)]
|
[BackgroundDependencyLoader(true)]
|
||||||
private void load(FrameworkDebugConfigManager config, FrameworkConfigManager frameworkConfig, OsuGame game)
|
private void load(FrameworkDebugConfigManager config, FrameworkConfigManager frameworkConfig, OsuGame game)
|
||||||
|
@ -4,13 +4,14 @@
|
|||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
using osu.Framework.Configuration;
|
using osu.Framework.Configuration;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
|
using osu.Framework.Localisation;
|
||||||
using osu.Framework.Platform;
|
using osu.Framework.Platform;
|
||||||
|
|
||||||
namespace osu.Game.Overlays.Settings.Sections.Debug
|
namespace osu.Game.Overlays.Settings.Sections.Debug
|
||||||
{
|
{
|
||||||
public class MemorySettings : SettingsSubsection
|
public class MemorySettings : SettingsSubsection
|
||||||
{
|
{
|
||||||
protected override string Header => "Memory";
|
protected override LocalisableString Header => "Memory";
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(FrameworkDebugConfigManager config, GameHost host)
|
private void load(FrameworkDebugConfigManager config, GameHost host)
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
using osu.Framework;
|
using osu.Framework;
|
||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
|
using osu.Framework.Localisation;
|
||||||
using osu.Game.Configuration;
|
using osu.Game.Configuration;
|
||||||
using osu.Game.Rulesets.Scoring;
|
using osu.Game.Rulesets.Scoring;
|
||||||
|
|
||||||
@ -11,7 +12,7 @@ namespace osu.Game.Overlays.Settings.Sections.Gameplay
|
|||||||
{
|
{
|
||||||
public class GeneralSettings : SettingsSubsection
|
public class GeneralSettings : SettingsSubsection
|
||||||
{
|
{
|
||||||
protected override string Header => "General";
|
protected override LocalisableString Header => "General";
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(OsuConfigManager config)
|
private void load(OsuConfigManager config)
|
||||||
|
@ -4,13 +4,14 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
|
using osu.Framework.Localisation;
|
||||||
using osu.Game.Configuration;
|
using osu.Game.Configuration;
|
||||||
|
|
||||||
namespace osu.Game.Overlays.Settings.Sections.Gameplay
|
namespace osu.Game.Overlays.Settings.Sections.Gameplay
|
||||||
{
|
{
|
||||||
public class ModsSettings : SettingsSubsection
|
public class ModsSettings : SettingsSubsection
|
||||||
{
|
{
|
||||||
protected override string Header => "Mods";
|
protected override LocalisableString Header => "Mods";
|
||||||
|
|
||||||
public override IEnumerable<string> FilterTerms => base.FilterTerms.Concat(new[] { "mod" });
|
public override IEnumerable<string> FilterTerms => base.FilterTerms.Concat(new[] { "mod" });
|
||||||
|
|
||||||
|
@ -5,6 +5,7 @@ using osu.Framework.Allocation;
|
|||||||
using osu.Framework.Bindables;
|
using osu.Framework.Bindables;
|
||||||
using osu.Framework.Configuration;
|
using osu.Framework.Configuration;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
|
using osu.Framework.Localisation;
|
||||||
using osu.Game.Extensions;
|
using osu.Game.Extensions;
|
||||||
using osu.Game.Localisation;
|
using osu.Game.Localisation;
|
||||||
|
|
||||||
@ -15,7 +16,7 @@ namespace osu.Game.Overlays.Settings.Sections.General
|
|||||||
private SettingsDropdown<Language> languageSelection;
|
private SettingsDropdown<Language> languageSelection;
|
||||||
private Bindable<string> frameworkLocale;
|
private Bindable<string> frameworkLocale;
|
||||||
|
|
||||||
protected override string Header => "Language";
|
protected override LocalisableString Header => "Language";
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(FrameworkConfigManager frameworkConfig)
|
private void load(FrameworkConfigManager frameworkConfig)
|
||||||
|
@ -5,6 +5,7 @@ using System.Threading.Tasks;
|
|||||||
using osu.Framework;
|
using osu.Framework;
|
||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
using osu.Framework.Graphics.Sprites;
|
using osu.Framework.Graphics.Sprites;
|
||||||
|
using osu.Framework.Localisation;
|
||||||
using osu.Framework.Platform;
|
using osu.Framework.Platform;
|
||||||
using osu.Framework.Screens;
|
using osu.Framework.Screens;
|
||||||
using osu.Game.Configuration;
|
using osu.Game.Configuration;
|
||||||
@ -19,7 +20,7 @@ namespace osu.Game.Overlays.Settings.Sections.General
|
|||||||
[Resolved(CanBeNull = true)]
|
[Resolved(CanBeNull = true)]
|
||||||
private UpdateManager updateManager { get; set; }
|
private UpdateManager updateManager { get; set; }
|
||||||
|
|
||||||
protected override string Header => "Updates";
|
protected override LocalisableString Header => "Updates";
|
||||||
|
|
||||||
private SettingsButton checkForUpdatesButton;
|
private SettingsButton checkForUpdatesButton;
|
||||||
|
|
||||||
|
@ -3,13 +3,14 @@
|
|||||||
|
|
||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
|
using osu.Framework.Localisation;
|
||||||
using osu.Game.Configuration;
|
using osu.Game.Configuration;
|
||||||
|
|
||||||
namespace osu.Game.Overlays.Settings.Sections.Graphics
|
namespace osu.Game.Overlays.Settings.Sections.Graphics
|
||||||
{
|
{
|
||||||
public class DetailSettings : SettingsSubsection
|
public class DetailSettings : SettingsSubsection
|
||||||
{
|
{
|
||||||
protected override string Header => "Detail Settings";
|
protected override LocalisableString Header => "Detail Settings";
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(OsuConfigManager config)
|
private void load(OsuConfigManager config)
|
||||||
|
@ -22,7 +22,7 @@ namespace osu.Game.Overlays.Settings.Sections.Graphics
|
|||||||
{
|
{
|
||||||
public class LayoutSettings : SettingsSubsection
|
public class LayoutSettings : SettingsSubsection
|
||||||
{
|
{
|
||||||
protected override string Header => "Layout";
|
protected override LocalisableString Header => "Layout";
|
||||||
|
|
||||||
private FillFlowContainer<SettingsSlider<float>> scalingSettings;
|
private FillFlowContainer<SettingsSlider<float>> scalingSettings;
|
||||||
|
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
using osu.Framework.Configuration;
|
using osu.Framework.Configuration;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
|
using osu.Framework.Localisation;
|
||||||
using osu.Framework.Platform;
|
using osu.Framework.Platform;
|
||||||
using osu.Game.Configuration;
|
using osu.Game.Configuration;
|
||||||
|
|
||||||
@ -11,7 +12,7 @@ namespace osu.Game.Overlays.Settings.Sections.Graphics
|
|||||||
{
|
{
|
||||||
public class RendererSettings : SettingsSubsection
|
public class RendererSettings : SettingsSubsection
|
||||||
{
|
{
|
||||||
protected override string Header => "Renderer";
|
protected override LocalisableString Header => "Renderer";
|
||||||
|
|
||||||
private SettingsEnumDropdown<FrameSync> frameLimiterDropdown;
|
private SettingsEnumDropdown<FrameSync> frameLimiterDropdown;
|
||||||
|
|
||||||
|
@ -2,12 +2,14 @@
|
|||||||
// See the LICENCE file in the repository root for full licence text.
|
// See the LICENCE file in the repository root for full licence text.
|
||||||
|
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
|
using osu.Framework.Localisation;
|
||||||
|
using osu.Game.Localisation;
|
||||||
|
|
||||||
namespace osu.Game.Overlays.Settings.Sections.Input
|
namespace osu.Game.Overlays.Settings.Sections.Input
|
||||||
{
|
{
|
||||||
public class BindingSettings : SettingsSubsection
|
public class BindingSettings : SettingsSubsection
|
||||||
{
|
{
|
||||||
protected override string Header => "Shortcut and gameplay bindings";
|
protected override LocalisableString Header => BindingSettingsStrings.ShortcutAndGameplayBindings;
|
||||||
|
|
||||||
public BindingSettings(KeyBindingPanel keyConfig)
|
public BindingSettings(KeyBindingPanel keyConfig)
|
||||||
{
|
{
|
||||||
@ -15,8 +17,8 @@ namespace osu.Game.Overlays.Settings.Sections.Input
|
|||||||
{
|
{
|
||||||
new SettingsButton
|
new SettingsButton
|
||||||
{
|
{
|
||||||
Text = "Configure",
|
Text = BindingSettingsStrings.Configure,
|
||||||
TooltipText = "change global shortcut keys and gameplay bindings",
|
TooltipText = BindingSettingsStrings.ChangeBindingsButton,
|
||||||
Action = keyConfig.ToggleVisibility
|
Action = keyConfig.ToggleVisibility
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
@ -10,6 +10,7 @@ using osu.Framework.Localisation;
|
|||||||
using osu.Game.Configuration;
|
using osu.Game.Configuration;
|
||||||
using osu.Game.Graphics.UserInterface;
|
using osu.Game.Graphics.UserInterface;
|
||||||
using osu.Game.Input;
|
using osu.Game.Input;
|
||||||
|
using osu.Game.Localisation;
|
||||||
|
|
||||||
namespace osu.Game.Overlays.Settings.Sections.Input
|
namespace osu.Game.Overlays.Settings.Sections.Input
|
||||||
{
|
{
|
||||||
@ -17,7 +18,7 @@ namespace osu.Game.Overlays.Settings.Sections.Input
|
|||||||
{
|
{
|
||||||
private readonly MouseHandler mouseHandler;
|
private readonly MouseHandler mouseHandler;
|
||||||
|
|
||||||
protected override string Header => "Mouse";
|
protected override LocalisableString Header => MouseSettingsStrings.Mouse;
|
||||||
|
|
||||||
private Bindable<double> handlerSensitivity;
|
private Bindable<double> handlerSensitivity;
|
||||||
|
|
||||||
@ -46,27 +47,29 @@ namespace osu.Game.Overlays.Settings.Sections.Input
|
|||||||
{
|
{
|
||||||
new SettingsCheckbox
|
new SettingsCheckbox
|
||||||
{
|
{
|
||||||
LabelText = "High precision mouse",
|
LabelText = MouseSettingsStrings.HighPrecisionMouse,
|
||||||
Current = relativeMode
|
TooltipText = MouseSettingsStrings.HighPrecisionMouseTooltip,
|
||||||
|
Current = relativeMode,
|
||||||
|
Keywords = new[] { @"raw", @"input", @"relative", @"cursor" }
|
||||||
},
|
},
|
||||||
new SensitivitySetting
|
new SensitivitySetting
|
||||||
{
|
{
|
||||||
LabelText = "Cursor sensitivity",
|
LabelText = MouseSettingsStrings.CursorSensitivity,
|
||||||
Current = localSensitivity
|
Current = localSensitivity
|
||||||
},
|
},
|
||||||
confineMouseModeSetting = new SettingsEnumDropdown<OsuConfineMouseMode>
|
confineMouseModeSetting = new SettingsEnumDropdown<OsuConfineMouseMode>
|
||||||
{
|
{
|
||||||
LabelText = "Confine mouse cursor to window",
|
LabelText = MouseSettingsStrings.ConfineMouseMode,
|
||||||
Current = osuConfig.GetBindable<OsuConfineMouseMode>(OsuSetting.ConfineMouseMode)
|
Current = osuConfig.GetBindable<OsuConfineMouseMode>(OsuSetting.ConfineMouseMode)
|
||||||
},
|
},
|
||||||
new SettingsCheckbox
|
new SettingsCheckbox
|
||||||
{
|
{
|
||||||
LabelText = "Disable mouse wheel during gameplay",
|
LabelText = MouseSettingsStrings.DisableMouseWheel,
|
||||||
Current = osuConfig.GetBindable<bool>(OsuSetting.MouseDisableWheel)
|
Current = osuConfig.GetBindable<bool>(OsuSetting.MouseDisableWheel)
|
||||||
},
|
},
|
||||||
new SettingsCheckbox
|
new SettingsCheckbox
|
||||||
{
|
{
|
||||||
LabelText = "Disable mouse buttons during gameplay",
|
LabelText = MouseSettingsStrings.DisableMouseButtons,
|
||||||
Current = osuConfig.GetBindable<bool>(OsuSetting.MouseDisableButtons)
|
Current = osuConfig.GetBindable<bool>(OsuSetting.MouseDisableButtons)
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
@ -96,7 +99,7 @@ namespace osu.Game.Overlays.Settings.Sections.Input
|
|||||||
if (isFullscreen)
|
if (isFullscreen)
|
||||||
{
|
{
|
||||||
confineMouseModeSetting.Current.Disabled = true;
|
confineMouseModeSetting.Current.Disabled = true;
|
||||||
confineMouseModeSetting.TooltipText = "Not applicable in full screen mode";
|
confineMouseModeSetting.TooltipText = MouseSettingsStrings.NotApplicableFullscreen;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -117,7 +120,7 @@ namespace osu.Game.Overlays.Settings.Sections.Input
|
|||||||
|
|
||||||
private class SensitivitySlider : OsuSliderBar<double>
|
private class SensitivitySlider : OsuSliderBar<double>
|
||||||
{
|
{
|
||||||
public override LocalisableString TooltipText => Current.Disabled ? "enable high precision mouse to adjust sensitivity" : $"{base.TooltipText}x";
|
public override LocalisableString TooltipText => Current.Disabled ? MouseSettingsStrings.EnableHighPrecisionForSensitivityAdjust : $"{base.TooltipText}x";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -36,7 +36,7 @@ namespace osu.Game.Overlays.Settings.Sections.Input
|
|||||||
RelativeSizeAxes = Axes.X,
|
RelativeSizeAxes = Axes.X,
|
||||||
Height = height,
|
Height = height,
|
||||||
Width = 0.25f,
|
Width = 0.25f,
|
||||||
Text = $"{presetRotation}º",
|
Text = $@"{presetRotation}º",
|
||||||
Action = () => tabletHandler.Rotation.Value = presetRotation,
|
Action = () => tabletHandler.Rotation.Value = presetRotation,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -6,10 +6,12 @@ using osu.Framework.Bindables;
|
|||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Framework.Graphics.Containers;
|
using osu.Framework.Graphics.Containers;
|
||||||
using osu.Framework.Input.Handlers.Tablet;
|
using osu.Framework.Input.Handlers.Tablet;
|
||||||
|
using osu.Framework.Localisation;
|
||||||
using osu.Framework.Platform;
|
using osu.Framework.Platform;
|
||||||
using osu.Framework.Threading;
|
using osu.Framework.Threading;
|
||||||
using osu.Game.Graphics.Sprites;
|
using osu.Game.Graphics.Sprites;
|
||||||
using osuTK;
|
using osuTK;
|
||||||
|
using osu.Game.Localisation;
|
||||||
|
|
||||||
namespace osu.Game.Overlays.Settings.Sections.Input
|
namespace osu.Game.Overlays.Settings.Sections.Input
|
||||||
{
|
{
|
||||||
@ -52,7 +54,7 @@ namespace osu.Game.Overlays.Settings.Sections.Input
|
|||||||
|
|
||||||
private OsuSpriteText noTabletMessage;
|
private OsuSpriteText noTabletMessage;
|
||||||
|
|
||||||
protected override string Header => "Tablet";
|
protected override LocalisableString Header => TabletSettingsStrings.Tablet;
|
||||||
|
|
||||||
public TabletSettings(ITabletHandler tabletHandler)
|
public TabletSettings(ITabletHandler tabletHandler)
|
||||||
{
|
{
|
||||||
@ -66,14 +68,14 @@ namespace osu.Game.Overlays.Settings.Sections.Input
|
|||||||
{
|
{
|
||||||
new SettingsCheckbox
|
new SettingsCheckbox
|
||||||
{
|
{
|
||||||
LabelText = "Enabled",
|
LabelText = CommonStrings.Enabled,
|
||||||
Anchor = Anchor.TopCentre,
|
Anchor = Anchor.TopCentre,
|
||||||
Origin = Anchor.TopCentre,
|
Origin = Anchor.TopCentre,
|
||||||
Current = tabletHandler.Enabled
|
Current = tabletHandler.Enabled
|
||||||
},
|
},
|
||||||
noTabletMessage = new OsuSpriteText
|
noTabletMessage = new OsuSpriteText
|
||||||
{
|
{
|
||||||
Text = "No tablet detected!",
|
Text = TabletSettingsStrings.NoTabletDetected,
|
||||||
Anchor = Anchor.TopCentre,
|
Anchor = Anchor.TopCentre,
|
||||||
Origin = Anchor.TopCentre,
|
Origin = Anchor.TopCentre,
|
||||||
Padding = new MarginPadding { Horizontal = SettingsPanel.CONTENT_MARGINS }
|
Padding = new MarginPadding { Horizontal = SettingsPanel.CONTENT_MARGINS }
|
||||||
@ -94,7 +96,7 @@ namespace osu.Game.Overlays.Settings.Sections.Input
|
|||||||
},
|
},
|
||||||
new DangerousSettingsButton
|
new DangerousSettingsButton
|
||||||
{
|
{
|
||||||
Text = "Reset to full area",
|
Text = TabletSettingsStrings.ResetToFullArea,
|
||||||
Action = () =>
|
Action = () =>
|
||||||
{
|
{
|
||||||
aspectLock.Value = false;
|
aspectLock.Value = false;
|
||||||
@ -105,7 +107,7 @@ namespace osu.Game.Overlays.Settings.Sections.Input
|
|||||||
},
|
},
|
||||||
new SettingsButton
|
new SettingsButton
|
||||||
{
|
{
|
||||||
Text = "Conform to current game aspect ratio",
|
Text = TabletSettingsStrings.ConformToCurrentGameAspectRatio,
|
||||||
Action = () =>
|
Action = () =>
|
||||||
{
|
{
|
||||||
forceAspectRatio((float)host.Window.ClientSize.Width / host.Window.ClientSize.Height);
|
forceAspectRatio((float)host.Window.ClientSize.Width / host.Window.ClientSize.Height);
|
||||||
@ -114,43 +116,43 @@ namespace osu.Game.Overlays.Settings.Sections.Input
|
|||||||
new SettingsSlider<float>
|
new SettingsSlider<float>
|
||||||
{
|
{
|
||||||
TransferValueOnCommit = true,
|
TransferValueOnCommit = true,
|
||||||
LabelText = "X Offset",
|
LabelText = TabletSettingsStrings.XOffset,
|
||||||
Current = offsetX
|
Current = offsetX
|
||||||
},
|
},
|
||||||
new SettingsSlider<float>
|
new SettingsSlider<float>
|
||||||
{
|
{
|
||||||
TransferValueOnCommit = true,
|
TransferValueOnCommit = true,
|
||||||
LabelText = "Y Offset",
|
LabelText = TabletSettingsStrings.YOffset,
|
||||||
Current = offsetY
|
Current = offsetY
|
||||||
},
|
},
|
||||||
new SettingsSlider<float>
|
new SettingsSlider<float>
|
||||||
{
|
{
|
||||||
TransferValueOnCommit = true,
|
TransferValueOnCommit = true,
|
||||||
LabelText = "Rotation",
|
LabelText = TabletSettingsStrings.Rotation,
|
||||||
Current = rotation
|
Current = rotation
|
||||||
},
|
},
|
||||||
new RotationPresetButtons(tabletHandler),
|
new RotationPresetButtons(tabletHandler),
|
||||||
new SettingsSlider<float>
|
new SettingsSlider<float>
|
||||||
{
|
{
|
||||||
TransferValueOnCommit = true,
|
TransferValueOnCommit = true,
|
||||||
LabelText = "Aspect Ratio",
|
LabelText = TabletSettingsStrings.AspectRatio,
|
||||||
Current = aspectRatio
|
Current = aspectRatio
|
||||||
},
|
},
|
||||||
new SettingsCheckbox
|
new SettingsCheckbox
|
||||||
{
|
{
|
||||||
LabelText = "Lock aspect ratio",
|
LabelText = TabletSettingsStrings.LockAspectRatio,
|
||||||
Current = aspectLock
|
Current = aspectLock
|
||||||
},
|
},
|
||||||
new SettingsSlider<float>
|
new SettingsSlider<float>
|
||||||
{
|
{
|
||||||
TransferValueOnCommit = true,
|
TransferValueOnCommit = true,
|
||||||
LabelText = "Width",
|
LabelText = CommonStrings.Width,
|
||||||
Current = sizeX
|
Current = sizeX
|
||||||
},
|
},
|
||||||
new SettingsSlider<float>
|
new SettingsSlider<float>
|
||||||
{
|
{
|
||||||
TransferValueOnCommit = true,
|
TransferValueOnCommit = true,
|
||||||
LabelText = "Height",
|
LabelText = CommonStrings.Height,
|
||||||
Current = sizeY
|
Current = sizeY
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
@ -9,6 +9,7 @@ using osu.Framework.Input.Handlers.Joystick;
|
|||||||
using osu.Framework.Input.Handlers.Midi;
|
using osu.Framework.Input.Handlers.Midi;
|
||||||
using osu.Framework.Input.Handlers.Mouse;
|
using osu.Framework.Input.Handlers.Mouse;
|
||||||
using osu.Framework.Input.Handlers.Tablet;
|
using osu.Framework.Input.Handlers.Tablet;
|
||||||
|
using osu.Framework.Localisation;
|
||||||
using osu.Framework.Platform;
|
using osu.Framework.Platform;
|
||||||
using osu.Game.Overlays.Settings.Sections.Input;
|
using osu.Game.Overlays.Settings.Sections.Input;
|
||||||
|
|
||||||
@ -100,7 +101,7 @@ namespace osu.Game.Overlays.Settings.Sections
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override string Header => handler.Description;
|
protected override LocalisableString Header => handler.Description;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -6,6 +6,7 @@ using System.Threading.Tasks;
|
|||||||
using JetBrains.Annotations;
|
using JetBrains.Annotations;
|
||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
|
using osu.Framework.Localisation;
|
||||||
using osu.Game.Beatmaps;
|
using osu.Game.Beatmaps;
|
||||||
using osu.Game.Collections;
|
using osu.Game.Collections;
|
||||||
using osu.Game.Database;
|
using osu.Game.Database;
|
||||||
@ -17,7 +18,7 @@ namespace osu.Game.Overlays.Settings.Sections.Maintenance
|
|||||||
{
|
{
|
||||||
public class GeneralSettings : SettingsSubsection
|
public class GeneralSettings : SettingsSubsection
|
||||||
{
|
{
|
||||||
protected override string Header => "General";
|
protected override LocalisableString Header => "General";
|
||||||
|
|
||||||
private TriangleButton importBeatmapsButton;
|
private TriangleButton importBeatmapsButton;
|
||||||
private TriangleButton importScoresButton;
|
private TriangleButton importScoresButton;
|
||||||
|
@ -3,13 +3,14 @@
|
|||||||
|
|
||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
|
using osu.Framework.Localisation;
|
||||||
using osu.Game.Configuration;
|
using osu.Game.Configuration;
|
||||||
|
|
||||||
namespace osu.Game.Overlays.Settings.Sections.Online
|
namespace osu.Game.Overlays.Settings.Sections.Online
|
||||||
{
|
{
|
||||||
public class AlertsAndPrivacySettings : SettingsSubsection
|
public class AlertsAndPrivacySettings : SettingsSubsection
|
||||||
{
|
{
|
||||||
protected override string Header => "Alerts and Privacy";
|
protected override LocalisableString Header => "Alerts and Privacy";
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(OsuConfigManager config)
|
private void load(OsuConfigManager config)
|
||||||
|
@ -3,13 +3,14 @@
|
|||||||
|
|
||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
|
using osu.Framework.Localisation;
|
||||||
using osu.Game.Configuration;
|
using osu.Game.Configuration;
|
||||||
|
|
||||||
namespace osu.Game.Overlays.Settings.Sections.Online
|
namespace osu.Game.Overlays.Settings.Sections.Online
|
||||||
{
|
{
|
||||||
public class IntegrationSettings : SettingsSubsection
|
public class IntegrationSettings : SettingsSubsection
|
||||||
{
|
{
|
||||||
protected override string Header => "Integrations";
|
protected override LocalisableString Header => "Integrations";
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(OsuConfigManager config)
|
private void load(OsuConfigManager config)
|
||||||
|
@ -3,13 +3,14 @@
|
|||||||
|
|
||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
|
using osu.Framework.Localisation;
|
||||||
using osu.Game.Configuration;
|
using osu.Game.Configuration;
|
||||||
|
|
||||||
namespace osu.Game.Overlays.Settings.Sections.Online
|
namespace osu.Game.Overlays.Settings.Sections.Online
|
||||||
{
|
{
|
||||||
public class WebSettings : SettingsSubsection
|
public class WebSettings : SettingsSubsection
|
||||||
{
|
{
|
||||||
protected override string Header => "Web";
|
protected override LocalisableString Header => "Web";
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(OsuConfigManager config)
|
private void load(OsuConfigManager config)
|
||||||
|
@ -11,7 +11,7 @@ namespace osu.Game.Overlays.Settings.Sections.UserInterface
|
|||||||
{
|
{
|
||||||
public class GeneralSettings : SettingsSubsection
|
public class GeneralSettings : SettingsSubsection
|
||||||
{
|
{
|
||||||
protected override string Header => "General";
|
protected override LocalisableString Header => "General";
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(OsuConfigManager config)
|
private void load(OsuConfigManager config)
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
using osu.Framework.Bindables;
|
using osu.Framework.Bindables;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
|
using osu.Framework.Localisation;
|
||||||
using osu.Game.Configuration;
|
using osu.Game.Configuration;
|
||||||
using osu.Game.Online.API;
|
using osu.Game.Online.API;
|
||||||
using osu.Game.Users;
|
using osu.Game.Users;
|
||||||
@ -12,7 +13,7 @@ namespace osu.Game.Overlays.Settings.Sections.UserInterface
|
|||||||
{
|
{
|
||||||
public class MainMenuSettings : SettingsSubsection
|
public class MainMenuSettings : SettingsSubsection
|
||||||
{
|
{
|
||||||
protected override string Header => "Main Menu";
|
protected override LocalisableString Header => "Main Menu";
|
||||||
|
|
||||||
private IBindable<User> user;
|
private IBindable<User> user;
|
||||||
|
|
||||||
|
@ -16,7 +16,7 @@ namespace osu.Game.Overlays.Settings.Sections.UserInterface
|
|||||||
private Bindable<double> minStars;
|
private Bindable<double> minStars;
|
||||||
private Bindable<double> maxStars;
|
private Bindable<double> maxStars;
|
||||||
|
|
||||||
protected override string Header => "Song Select";
|
protected override LocalisableString Header => "Song Select";
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(OsuConfigManager config)
|
private void load(OsuConfigManager config)
|
||||||
|
@ -8,6 +8,7 @@ using osu.Game.Graphics.Sprites;
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
|
using osu.Framework.Localisation;
|
||||||
using osu.Framework.Testing;
|
using osu.Framework.Testing;
|
||||||
using osu.Game.Graphics;
|
using osu.Game.Graphics;
|
||||||
|
|
||||||
@ -20,10 +21,10 @@ namespace osu.Game.Overlays.Settings
|
|||||||
|
|
||||||
protected readonly FillFlowContainer FlowContent;
|
protected readonly FillFlowContainer FlowContent;
|
||||||
|
|
||||||
protected abstract string Header { get; }
|
protected abstract LocalisableString Header { get; }
|
||||||
|
|
||||||
public IEnumerable<IFilterable> FilterableChildren => Children.OfType<IFilterable>();
|
public IEnumerable<IFilterable> FilterableChildren => Children.OfType<IFilterable>();
|
||||||
public virtual IEnumerable<string> FilterTerms => new[] { Header };
|
public virtual IEnumerable<string> FilterTerms => new[] { Header.ToString() };
|
||||||
|
|
||||||
public bool MatchingFilter
|
public bool MatchingFilter
|
||||||
{
|
{
|
||||||
@ -54,7 +55,7 @@ namespace osu.Game.Overlays.Settings
|
|||||||
{
|
{
|
||||||
new OsuSpriteText
|
new OsuSpriteText
|
||||||
{
|
{
|
||||||
Text = Header.ToUpperInvariant(),
|
Text = Header.ToString().ToUpper(), // TODO: Add localisation support after https://github.com/ppy/osu-framework/pull/4603 is merged.
|
||||||
Margin = new MarginPadding { Vertical = 30, Left = SettingsPanel.CONTENT_MARGINS, Right = SettingsPanel.CONTENT_MARGINS },
|
Margin = new MarginPadding { Vertical = 30, Left = SettingsPanel.CONTENT_MARGINS, Right = SettingsPanel.CONTENT_MARGINS },
|
||||||
Font = OsuFont.GetFont(weight: FontWeight.Bold),
|
Font = OsuFont.GetFont(weight: FontWeight.Bold),
|
||||||
},
|
},
|
||||||
|
@ -14,7 +14,7 @@ namespace osu.Game.Overlays.Wiki.Markdown
|
|||||||
public class WikiMarkdownImageBlock : FillFlowContainer
|
public class WikiMarkdownImageBlock : FillFlowContainer
|
||||||
{
|
{
|
||||||
[Resolved]
|
[Resolved]
|
||||||
private IMarkdownTextComponent parentTextComponent { get; set; }
|
private IMarkdownTextFlowComponent parentFlowComponent { get; set; }
|
||||||
|
|
||||||
private readonly LinkInline linkInline;
|
private readonly LinkInline linkInline;
|
||||||
|
|
||||||
@ -31,16 +31,20 @@ namespace osu.Game.Overlays.Wiki.Markdown
|
|||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load()
|
private void load()
|
||||||
{
|
{
|
||||||
|
MarkdownTextFlowContainer textFlow;
|
||||||
|
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
new BlockMarkdownImage(linkInline),
|
new BlockMarkdownImage(linkInline),
|
||||||
parentTextComponent.CreateSpriteText().With(t =>
|
textFlow = parentFlowComponent.CreateTextFlow().With(t =>
|
||||||
{
|
{
|
||||||
t.Text = linkInline.Title;
|
|
||||||
t.Anchor = Anchor.TopCentre;
|
t.Anchor = Anchor.TopCentre;
|
||||||
t.Origin = Anchor.TopCentre;
|
t.Origin = Anchor.TopCentre;
|
||||||
|
t.TextAnchor = Anchor.TopCentre;
|
||||||
}),
|
}),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
textFlow.AddText(linkInline.Title);
|
||||||
}
|
}
|
||||||
|
|
||||||
private class BlockMarkdownImage : WikiMarkdownImage
|
private class BlockMarkdownImage : WikiMarkdownImage
|
||||||
|
@ -31,12 +31,12 @@
|
|||||||
<PackageReference Include="Microsoft.Extensions.Configuration.Abstractions" Version="5.0.0" />
|
<PackageReference Include="Microsoft.Extensions.Configuration.Abstractions" Version="5.0.0" />
|
||||||
<PackageReference Include="Microsoft.NETCore.Targets" Version="3.1.0" />
|
<PackageReference Include="Microsoft.NETCore.Targets" Version="3.1.0" />
|
||||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
|
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
|
||||||
<PackageReference Include="ppy.LocalisationAnalyser" Version="2021.706.0">
|
<PackageReference Include="ppy.LocalisationAnalyser" Version="2021.716.0">
|
||||||
<PrivateAssets>all</PrivateAssets>
|
<PrivateAssets>all</PrivateAssets>
|
||||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="Realm" Version="10.3.0" />
|
<PackageReference Include="Realm" Version="10.3.0" />
|
||||||
<PackageReference Include="ppy.osu.Framework" Version="2021.713.0" />
|
<PackageReference Include="ppy.osu.Framework" Version="2021.714.0" />
|
||||||
<PackageReference Include="ppy.osu.Game.Resources" Version="2021.706.0" />
|
<PackageReference Include="ppy.osu.Game.Resources" Version="2021.706.0" />
|
||||||
<PackageReference Include="Sentry" Version="3.6.0" />
|
<PackageReference Include="Sentry" Version="3.6.0" />
|
||||||
<PackageReference Include="SharpCompress" Version="0.28.3" />
|
<PackageReference Include="SharpCompress" Version="0.28.3" />
|
||||||
|
@ -70,7 +70,7 @@
|
|||||||
<Reference Include="System.Net.Http" />
|
<Reference Include="System.Net.Http" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup Label="Package References">
|
<ItemGroup Label="Package References">
|
||||||
<PackageReference Include="ppy.osu.Framework.iOS" Version="2021.713.0" />
|
<PackageReference Include="ppy.osu.Framework.iOS" Version="2021.714.0" />
|
||||||
<PackageReference Include="ppy.osu.Game.Resources" Version="2021.706.0" />
|
<PackageReference Include="ppy.osu.Game.Resources" Version="2021.706.0" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<!-- See https://github.com/dotnet/runtime/issues/35988 (can be removed after Xamarin uses net5.0 / net6.0) -->
|
<!-- See https://github.com/dotnet/runtime/issues/35988 (can be removed after Xamarin uses net5.0 / net6.0) -->
|
||||||
@ -93,7 +93,7 @@
|
|||||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="2.2.6" />
|
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="2.2.6" />
|
||||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite.Core" Version="2.2.6" />
|
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite.Core" Version="2.2.6" />
|
||||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
|
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
|
||||||
<PackageReference Include="ppy.osu.Framework" Version="2021.713.0" />
|
<PackageReference Include="ppy.osu.Framework" Version="2021.714.0" />
|
||||||
<PackageReference Include="SharpCompress" Version="0.28.3" />
|
<PackageReference Include="SharpCompress" Version="0.28.3" />
|
||||||
<PackageReference Include="NUnit" Version="3.13.2" />
|
<PackageReference Include="NUnit" Version="3.13.2" />
|
||||||
<PackageReference Include="SharpRaven" Version="2.4.0" />
|
<PackageReference Include="SharpRaven" Version="2.4.0" />
|
||||||
|
Loading…
x
Reference in New Issue
Block a user