mirror of
https://github.com/ppy/osu.git
synced 2024-12-15 23:13:20 +08:00
Merge branch 'master' into timline-beat-lines
This commit is contained in:
commit
4d43833db4
@ -135,7 +135,7 @@ csharp_preferred_modifier_order = public,private,protected,internal,new,abstract
|
|||||||
csharp_style_expression_bodied_accessors = true:warning
|
csharp_style_expression_bodied_accessors = true:warning
|
||||||
csharp_style_expression_bodied_constructors = false:none
|
csharp_style_expression_bodied_constructors = false:none
|
||||||
csharp_style_expression_bodied_indexers = true:warning
|
csharp_style_expression_bodied_indexers = true:warning
|
||||||
csharp_style_expression_bodied_methods = true:silent
|
csharp_style_expression_bodied_methods = false:silent
|
||||||
csharp_style_expression_bodied_operators = true:warning
|
csharp_style_expression_bodied_operators = true:warning
|
||||||
csharp_style_expression_bodied_properties = true:warning
|
csharp_style_expression_bodied_properties = true:warning
|
||||||
csharp_style_expression_bodied_local_functions = true:silent
|
csharp_style_expression_bodied_local_functions = true:silent
|
||||||
|
@ -8,6 +8,8 @@ using osu.Game.Online.API.Requests;
|
|||||||
using osu.Framework.Graphics.Containers;
|
using osu.Framework.Graphics.Containers;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Game.Overlays.Comments;
|
using osu.Game.Overlays.Comments;
|
||||||
|
using osu.Game.Overlays;
|
||||||
|
using osu.Framework.Allocation;
|
||||||
|
|
||||||
namespace osu.Game.Tests.Visual.Online
|
namespace osu.Game.Tests.Visual.Online
|
||||||
{
|
{
|
||||||
@ -28,6 +30,9 @@ namespace osu.Game.Tests.Visual.Online
|
|||||||
|
|
||||||
protected override bool UseOnlineAPI => true;
|
protected override bool UseOnlineAPI => true;
|
||||||
|
|
||||||
|
[Cached]
|
||||||
|
private readonly OverlayColourProvider colourProvider = new OverlayColourProvider(OverlayColourScheme.Purple);
|
||||||
|
|
||||||
public TestSceneCommentsContainer()
|
public TestSceneCommentsContainer()
|
||||||
{
|
{
|
||||||
BasicScrollContainer scroll;
|
BasicScrollContainer scroll;
|
||||||
|
@ -4,7 +4,9 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using NUnit.Framework;
|
using NUnit.Framework;
|
||||||
|
using osu.Framework.Allocation;
|
||||||
using osu.Framework.Bindables;
|
using osu.Framework.Bindables;
|
||||||
|
using osu.Game.Overlays;
|
||||||
using osu.Game.Overlays.Comments;
|
using osu.Game.Overlays.Comments;
|
||||||
|
|
||||||
namespace osu.Game.Tests.Visual.Online
|
namespace osu.Game.Tests.Visual.Online
|
||||||
@ -19,6 +21,9 @@ namespace osu.Game.Tests.Visual.Online
|
|||||||
typeof(SortTabControl),
|
typeof(SortTabControl),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
[Cached]
|
||||||
|
private readonly OverlayColourProvider colourProvider = new OverlayColourProvider(OverlayColourScheme.Blue);
|
||||||
|
|
||||||
private readonly Bindable<CommentsSortCriteria> sort = new Bindable<CommentsSortCriteria>();
|
private readonly Bindable<CommentsSortCriteria> sort = new Bindable<CommentsSortCriteria>();
|
||||||
private readonly BindableBool showDeleted = new BindableBool();
|
private readonly BindableBool showDeleted = new BindableBool();
|
||||||
|
|
||||||
|
@ -7,6 +7,8 @@ using osu.Framework.Graphics;
|
|||||||
using osu.Framework.Bindables;
|
using osu.Framework.Bindables;
|
||||||
using osu.Game.Overlays.Comments;
|
using osu.Game.Overlays.Comments;
|
||||||
using osu.Framework.Utils;
|
using osu.Framework.Utils;
|
||||||
|
using osu.Framework.Allocation;
|
||||||
|
using osu.Game.Overlays;
|
||||||
|
|
||||||
namespace osu.Game.Tests.Visual.Online
|
namespace osu.Game.Tests.Visual.Online
|
||||||
{
|
{
|
||||||
@ -17,6 +19,9 @@ namespace osu.Game.Tests.Visual.Online
|
|||||||
typeof(TotalCommentsCounter),
|
typeof(TotalCommentsCounter),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
[Cached]
|
||||||
|
private readonly OverlayColourProvider colourProvider = new OverlayColourProvider(OverlayColourScheme.Blue);
|
||||||
|
|
||||||
public TestSceneTotalCommentsCounter()
|
public TestSceneTotalCommentsCounter()
|
||||||
{
|
{
|
||||||
var count = new BindableInt();
|
var count = new BindableInt();
|
||||||
|
@ -118,6 +118,7 @@ namespace osu.Game.Tests.Visual.SongSelect
|
|||||||
InputManager.ReleaseKey(Key.Enter);
|
InputManager.ReleaseKey(Key.Enter);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
AddUntilStep("wait for not current", () => !songSelect.IsCurrentScreen());
|
||||||
AddAssert("ensure selection changed", () => selected != Beatmap.Value);
|
AddAssert("ensure selection changed", () => selected != Beatmap.Value);
|
||||||
|
|
||||||
AddUntilStep("wait for return to song select", () => songSelect.IsCurrentScreen());
|
AddUntilStep("wait for return to song select", () => songSelect.IsCurrentScreen());
|
||||||
@ -145,6 +146,7 @@ namespace osu.Game.Tests.Visual.SongSelect
|
|||||||
InputManager.ReleaseKey(Key.Down);
|
InputManager.ReleaseKey(Key.Down);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
AddUntilStep("wait for not current", () => !songSelect.IsCurrentScreen());
|
||||||
AddAssert("ensure selection didn't change", () => selected == Beatmap.Value);
|
AddAssert("ensure selection didn't change", () => selected == Beatmap.Value);
|
||||||
|
|
||||||
AddUntilStep("wait for return to song select", () => songSelect.IsCurrentScreen());
|
AddUntilStep("wait for return to song select", () => songSelect.IsCurrentScreen());
|
||||||
@ -176,6 +178,7 @@ namespace osu.Game.Tests.Visual.SongSelect
|
|||||||
InputManager.ReleaseKey(Key.Enter);
|
InputManager.ReleaseKey(Key.Enter);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
AddUntilStep("wait for not current", () => !songSelect.IsCurrentScreen());
|
||||||
AddAssert("ensure selection changed", () => selected != Beatmap.Value);
|
AddAssert("ensure selection changed", () => selected != Beatmap.Value);
|
||||||
|
|
||||||
AddUntilStep("wait for return to song select", () => songSelect.IsCurrentScreen());
|
AddUntilStep("wait for return to song select", () => songSelect.IsCurrentScreen());
|
||||||
@ -208,6 +211,7 @@ namespace osu.Game.Tests.Visual.SongSelect
|
|||||||
InputManager.ReleaseButton(MouseButton.Left);
|
InputManager.ReleaseButton(MouseButton.Left);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
AddUntilStep("wait for not current", () => !songSelect.IsCurrentScreen());
|
||||||
AddAssert("ensure selection didn't change", () => selected == Beatmap.Value);
|
AddAssert("ensure selection didn't change", () => selected == Beatmap.Value);
|
||||||
|
|
||||||
AddUntilStep("wait for return to song select", () => songSelect.IsCurrentScreen());
|
AddUntilStep("wait for return to song select", () => songSelect.IsCurrentScreen());
|
||||||
|
@ -7,9 +7,7 @@ using System;
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Game.Graphics.Sprites;
|
using osu.Game.Graphics.Sprites;
|
||||||
using osu.Framework.Graphics.Sprites;
|
|
||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
using osu.Framework.Graphics.Textures;
|
|
||||||
using osu.Game.Graphics.UserInterface;
|
using osu.Game.Graphics.UserInterface;
|
||||||
using osu.Framework.Graphics.Shapes;
|
using osu.Framework.Graphics.Shapes;
|
||||||
using osuTK.Graphics;
|
using osuTK.Graphics;
|
||||||
@ -27,6 +25,7 @@ namespace osu.Game.Tests.Visual.UserInterface
|
|||||||
typeof(TestStringTabControlHeader),
|
typeof(TestStringTabControlHeader),
|
||||||
typeof(TestEnumTabControlHeader),
|
typeof(TestEnumTabControlHeader),
|
||||||
typeof(TestBreadcrumbControlHeader),
|
typeof(TestBreadcrumbControlHeader),
|
||||||
|
typeof(OverlayHeaderBackground)
|
||||||
};
|
};
|
||||||
|
|
||||||
private readonly FillFlowContainer flow;
|
private readonly FillFlowContainer flow;
|
||||||
@ -52,10 +51,11 @@ namespace osu.Game.Tests.Visual.UserInterface
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
addHeader("Orange OverlayHeader (no background)", new TestNoBackgroundHeader(), OverlayColourScheme.Orange);
|
||||||
addHeader("Blue OverlayHeader", new TestNoControlHeader(), OverlayColourScheme.Blue);
|
addHeader("Blue OverlayHeader", new TestNoControlHeader(), OverlayColourScheme.Blue);
|
||||||
addHeader("Green TabControlOverlayHeader (string)", new TestStringTabControlHeader(), OverlayColourScheme.Green);
|
addHeader("Green TabControlOverlayHeader (string)", new TestStringTabControlHeader(), OverlayColourScheme.Green);
|
||||||
addHeader("Pink TabControlOverlayHeader (enum)", new TestEnumTabControlHeader(), OverlayColourScheme.Pink);
|
addHeader("Pink TabControlOverlayHeader (enum)", new TestEnumTabControlHeader(), OverlayColourScheme.Pink);
|
||||||
addHeader("Red BreadcrumbControlOverlayHeader", new TestBreadcrumbControlHeader(), OverlayColourScheme.Red);
|
addHeader("Red BreadcrumbControlOverlayHeader (no background)", new TestBreadcrumbControlHeader(), OverlayColourScheme.Red);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void addHeader(string name, OverlayHeader header, OverlayColourScheme colourScheme)
|
private void addHeader(string name, OverlayHeader header, OverlayColourScheme colourScheme)
|
||||||
@ -98,16 +98,21 @@ namespace osu.Game.Tests.Visual.UserInterface
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private class TestNoBackgroundHeader : OverlayHeader
|
||||||
|
{
|
||||||
|
protected override ScreenTitle CreateTitle() => new TestTitle();
|
||||||
|
}
|
||||||
|
|
||||||
private class TestNoControlHeader : OverlayHeader
|
private class TestNoControlHeader : OverlayHeader
|
||||||
{
|
{
|
||||||
protected override Drawable CreateBackground() => new TestBackground();
|
protected override Drawable CreateBackground() => new OverlayHeaderBackground(@"Headers/changelog");
|
||||||
|
|
||||||
protected override ScreenTitle CreateTitle() => new TestTitle();
|
protected override ScreenTitle CreateTitle() => new TestTitle();
|
||||||
}
|
}
|
||||||
|
|
||||||
private class TestStringTabControlHeader : TabControlOverlayHeader<string>
|
private class TestStringTabControlHeader : TabControlOverlayHeader<string>
|
||||||
{
|
{
|
||||||
protected override Drawable CreateBackground() => new TestBackground();
|
protected override Drawable CreateBackground() => new OverlayHeaderBackground(@"Headers/news");
|
||||||
|
|
||||||
protected override ScreenTitle CreateTitle() => new TestTitle();
|
protected override ScreenTitle CreateTitle() => new TestTitle();
|
||||||
|
|
||||||
@ -120,7 +125,7 @@ namespace osu.Game.Tests.Visual.UserInterface
|
|||||||
|
|
||||||
private class TestEnumTabControlHeader : TabControlOverlayHeader<TestEnum>
|
private class TestEnumTabControlHeader : TabControlOverlayHeader<TestEnum>
|
||||||
{
|
{
|
||||||
protected override Drawable CreateBackground() => new TestBackground();
|
protected override Drawable CreateBackground() => new OverlayHeaderBackground(@"Headers/rankings");
|
||||||
|
|
||||||
protected override ScreenTitle CreateTitle() => new TestTitle();
|
protected override ScreenTitle CreateTitle() => new TestTitle();
|
||||||
}
|
}
|
||||||
@ -134,8 +139,6 @@ namespace osu.Game.Tests.Visual.UserInterface
|
|||||||
|
|
||||||
private class TestBreadcrumbControlHeader : BreadcrumbControlOverlayHeader
|
private class TestBreadcrumbControlHeader : BreadcrumbControlOverlayHeader
|
||||||
{
|
{
|
||||||
protected override Drawable CreateBackground() => new TestBackground();
|
|
||||||
|
|
||||||
protected override ScreenTitle CreateTitle() => new TestTitle();
|
protected override ScreenTitle CreateTitle() => new TestTitle();
|
||||||
|
|
||||||
public TestBreadcrumbControlHeader()
|
public TestBreadcrumbControlHeader()
|
||||||
@ -146,21 +149,6 @@ namespace osu.Game.Tests.Visual.UserInterface
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private class TestBackground : Sprite
|
|
||||||
{
|
|
||||||
public TestBackground()
|
|
||||||
{
|
|
||||||
RelativeSizeAxes = Axes.Both;
|
|
||||||
FillMode = FillMode.Fill;
|
|
||||||
}
|
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
|
||||||
private void load(TextureStore textures)
|
|
||||||
{
|
|
||||||
Texture = textures.Get(@"Headers/changelog");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private class TestTitle : ScreenTitle
|
private class TestTitle : ScreenTitle
|
||||||
{
|
{
|
||||||
public TestTitle()
|
public TestTitle()
|
||||||
|
@ -0,0 +1,42 @@
|
|||||||
|
// 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.Graphics.Containers;
|
||||||
|
using osu.Game.Overlays;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using osu.Framework.Graphics;
|
||||||
|
using osuTK;
|
||||||
|
|
||||||
|
namespace osu.Game.Tests.Visual.UserInterface
|
||||||
|
{
|
||||||
|
public class TestSceneOverlayHeaderBackground : OsuTestScene
|
||||||
|
{
|
||||||
|
public override IReadOnlyList<Type> RequiredTypes => new[]
|
||||||
|
{
|
||||||
|
typeof(OverlayHeaderBackground)
|
||||||
|
};
|
||||||
|
|
||||||
|
public TestSceneOverlayHeaderBackground()
|
||||||
|
{
|
||||||
|
Add(new BasicScrollContainer
|
||||||
|
{
|
||||||
|
RelativeSizeAxes = Axes.Both,
|
||||||
|
Child = new FillFlowContainer
|
||||||
|
{
|
||||||
|
AutoSizeAxes = Axes.Y,
|
||||||
|
RelativeSizeAxes = Axes.X,
|
||||||
|
Direction = FillDirection.Vertical,
|
||||||
|
Spacing = new Vector2(0, 20),
|
||||||
|
Children = new[]
|
||||||
|
{
|
||||||
|
new OverlayHeaderBackground(@"Headers/changelog"),
|
||||||
|
new OverlayHeaderBackground(@"Headers/news"),
|
||||||
|
new OverlayHeaderBackground(@"Headers/rankings"),
|
||||||
|
new OverlayHeaderBackground(@"Headers/search"),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -36,6 +36,11 @@ namespace osu.Game.Graphics.UserInterface
|
|||||||
|
|
||||||
public virtual string TooltipText { get; private set; }
|
public virtual string TooltipText { get; private set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Whether to format the tooltip as a percentage or the actual value.
|
||||||
|
/// </summary>
|
||||||
|
public bool DisplayAsPercentage { get; set; }
|
||||||
|
|
||||||
private Color4 accentColour;
|
private Color4 accentColour;
|
||||||
|
|
||||||
public Color4 AccentColour
|
public Color4 AccentColour
|
||||||
@ -169,11 +174,11 @@ namespace osu.Game.Graphics.UserInterface
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
double floatValue = value.ToDouble(NumberFormatInfo.InvariantInfo);
|
double floatValue = value.ToDouble(NumberFormatInfo.InvariantInfo);
|
||||||
double floatMinValue = CurrentNumber.MinValue.ToDouble(NumberFormatInfo.InvariantInfo);
|
|
||||||
double floatMaxValue = CurrentNumber.MaxValue.ToDouble(NumberFormatInfo.InvariantInfo);
|
|
||||||
|
|
||||||
if (floatMaxValue == 1 && floatMinValue >= -1)
|
if (DisplayAsPercentage)
|
||||||
|
{
|
||||||
TooltipText = floatValue.ToString("P0");
|
TooltipText = floatValue.ToString("P0");
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
var decimalPrecision = normalise(CurrentNumber.Precision.ToDecimal(NumberFormatInfo.InvariantInfo), max_decimal_digits);
|
var decimalPrecision = normalise(CurrentNumber.Precision.ToDecimal(NumberFormatInfo.InvariantInfo), max_decimal_digits);
|
||||||
|
@ -4,12 +4,9 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using osu.Framework.Allocation;
|
|
||||||
using osu.Framework.Bindables;
|
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.Graphics.Sprites;
|
|
||||||
using osu.Framework.Graphics.Textures;
|
|
||||||
using osu.Game.Graphics.UserInterface;
|
using osu.Game.Graphics.UserInterface;
|
||||||
using osu.Game.Online.API.Requests.Responses;
|
using osu.Game.Online.API.Requests.Responses;
|
||||||
|
|
||||||
@ -67,7 +64,7 @@ namespace osu.Game.Overlays.Changelog
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override Drawable CreateBackground() => new HeaderBackground();
|
protected override Drawable CreateBackground() => new OverlayHeaderBackground(@"Headers/changelog");
|
||||||
|
|
||||||
protected override Drawable CreateContent() => new Container
|
protected override Drawable CreateContent() => new Container
|
||||||
{
|
{
|
||||||
@ -95,21 +92,6 @@ namespace osu.Game.Overlays.Changelog
|
|||||||
Streams.Current.Value = Streams.Items.FirstOrDefault(s => s.Name == Current.Value.UpdateStream.Name);
|
Streams.Current.Value = Streams.Items.FirstOrDefault(s => s.Name == Current.Value.UpdateStream.Name);
|
||||||
}
|
}
|
||||||
|
|
||||||
public class HeaderBackground : Sprite
|
|
||||||
{
|
|
||||||
public HeaderBackground()
|
|
||||||
{
|
|
||||||
RelativeSizeAxes = Axes.Both;
|
|
||||||
FillMode = FillMode.Fill;
|
|
||||||
}
|
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
|
||||||
private void load(TextureStore textures)
|
|
||||||
{
|
|
||||||
Texture = textures.Get(@"Headers/changelog");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private class ChangelogHeaderTitle : ScreenTitle
|
private class ChangelogHeaderTitle : ScreenTitle
|
||||||
{
|
{
|
||||||
public string Version
|
public string Version
|
||||||
|
@ -8,7 +8,6 @@ using osu.Game.Online.API.Requests;
|
|||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Framework.Bindables;
|
using osu.Framework.Bindables;
|
||||||
using osu.Framework.Graphics.Shapes;
|
using osu.Framework.Graphics.Shapes;
|
||||||
using osu.Game.Graphics;
|
|
||||||
using osu.Game.Online.API.Requests.Responses;
|
using osu.Game.Online.API.Requests.Responses;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
@ -27,28 +26,26 @@ namespace osu.Game.Overlays.Comments
|
|||||||
[Resolved]
|
[Resolved]
|
||||||
private IAPIProvider api { get; set; }
|
private IAPIProvider api { get; set; }
|
||||||
|
|
||||||
[Resolved]
|
|
||||||
private OsuColour colours { get; set; }
|
|
||||||
|
|
||||||
private GetCommentsRequest request;
|
private GetCommentsRequest request;
|
||||||
private CancellationTokenSource loadCancellation;
|
private CancellationTokenSource loadCancellation;
|
||||||
private int currentPage;
|
private int currentPage;
|
||||||
|
|
||||||
private readonly Box background;
|
private FillFlowContainer content;
|
||||||
private readonly FillFlowContainer content;
|
private DeletedChildrenPlaceholder deletedChildrenPlaceholder;
|
||||||
private readonly DeletedChildrenPlaceholder deletedChildrenPlaceholder;
|
private CommentsShowMoreButton moreButton;
|
||||||
private readonly CommentsShowMoreButton moreButton;
|
private TotalCommentsCounter commentCounter;
|
||||||
private readonly TotalCommentsCounter commentCounter;
|
|
||||||
|
|
||||||
public CommentsContainer()
|
[BackgroundDependencyLoader]
|
||||||
|
private void load(OverlayColourProvider colourProvider)
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.X;
|
RelativeSizeAxes = Axes.X;
|
||||||
AutoSizeAxes = Axes.Y;
|
AutoSizeAxes = Axes.Y;
|
||||||
AddRangeInternal(new Drawable[]
|
AddRangeInternal(new Drawable[]
|
||||||
{
|
{
|
||||||
background = new Box
|
new Box
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
|
Colour = colourProvider.Background5
|
||||||
},
|
},
|
||||||
new FillFlowContainer
|
new FillFlowContainer
|
||||||
{
|
{
|
||||||
@ -78,7 +75,7 @@ namespace osu.Game.Overlays.Comments
|
|||||||
new Box
|
new Box
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
Colour = OsuColour.Gray(0.2f)
|
Colour = colourProvider.Background4
|
||||||
},
|
},
|
||||||
new FillFlowContainer
|
new FillFlowContainer
|
||||||
{
|
{
|
||||||
@ -113,12 +110,6 @@ namespace osu.Game.Overlays.Comments
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
|
||||||
private void load()
|
|
||||||
{
|
|
||||||
background.Colour = colours.Gray2;
|
|
||||||
}
|
|
||||||
|
|
||||||
protected override void LoadComplete()
|
protected override void LoadComplete()
|
||||||
{
|
{
|
||||||
Sort.BindValueChanged(_ => refetchComments(), true);
|
Sort.BindValueChanged(_ => refetchComments(), true);
|
||||||
|
@ -76,9 +76,9 @@ namespace osu.Game.Overlays.Comments
|
|||||||
}
|
}
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(OsuColour colours)
|
private void load(OverlayColourProvider colourProvider)
|
||||||
{
|
{
|
||||||
background.Colour = colours.Gray3;
|
background.Colour = colourProvider.Background4;
|
||||||
}
|
}
|
||||||
|
|
||||||
private class ShowDeletedButton : HeaderButton
|
private class ShowDeletedButton : HeaderButton
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
// 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.Allocation;
|
||||||
using osu.Framework.Bindables;
|
using osu.Framework.Bindables;
|
||||||
using osu.Game.Graphics;
|
|
||||||
using osu.Game.Graphics.UserInterface;
|
using osu.Game.Graphics.UserInterface;
|
||||||
|
|
||||||
namespace osu.Game.Overlays.Comments
|
namespace osu.Game.Overlays.Comments
|
||||||
@ -11,11 +11,12 @@ namespace osu.Game.Overlays.Comments
|
|||||||
{
|
{
|
||||||
public readonly BindableInt Current = new BindableInt();
|
public readonly BindableInt Current = new BindableInt();
|
||||||
|
|
||||||
public CommentsShowMoreButton()
|
[BackgroundDependencyLoader]
|
||||||
|
private void load(OverlayColourProvider colourProvider)
|
||||||
{
|
{
|
||||||
IdleColour = OsuColour.Gray(0.3f);
|
IdleColour = colourProvider.Background2;
|
||||||
HoverColour = OsuColour.Gray(0.4f);
|
HoverColour = colourProvider.Background1;
|
||||||
ChevronIconColour = OsuColour.Gray(0.5f);
|
ChevronIconColour = colourProvider.Foreground1;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void LoadComplete()
|
protected override void LoadComplete()
|
||||||
|
@ -5,7 +5,6 @@ using osu.Framework.Allocation;
|
|||||||
using osu.Framework.Graphics.Containers;
|
using osu.Framework.Graphics.Containers;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Framework.Graphics.Shapes;
|
using osu.Framework.Graphics.Shapes;
|
||||||
using osu.Game.Graphics;
|
|
||||||
using osu.Framework.Input.Events;
|
using osu.Framework.Input.Events;
|
||||||
using osu.Game.Graphics.UserInterface;
|
using osu.Game.Graphics.UserInterface;
|
||||||
|
|
||||||
@ -45,9 +44,9 @@ namespace osu.Game.Overlays.Comments
|
|||||||
}
|
}
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(OsuColour colours)
|
private void load(OverlayColourProvider colourProvider)
|
||||||
{
|
{
|
||||||
background.Colour = colours.Gray4;
|
background.Colour = colourProvider.Background3;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override bool OnHover(HoverEvent e)
|
protected override bool OnHover(HoverEvent e)
|
||||||
|
@ -56,7 +56,7 @@ namespace osu.Game.Overlays.Comments
|
|||||||
public readonly BindableBool Active = new BindableBool();
|
public readonly BindableBool Active = new BindableBool();
|
||||||
|
|
||||||
[Resolved]
|
[Resolved]
|
||||||
private OsuColour colours { get; set; }
|
private OverlayColourProvider colourProvider { get; set; }
|
||||||
|
|
||||||
private readonly SpriteText text;
|
private readonly SpriteText text;
|
||||||
|
|
||||||
@ -78,7 +78,7 @@ namespace osu.Game.Overlays.Comments
|
|||||||
updateBackgroundState();
|
updateBackgroundState();
|
||||||
|
|
||||||
text.Font = text.Font.With(weight: active.NewValue ? FontWeight.Bold : FontWeight.Medium);
|
text.Font = text.Font.With(weight: active.NewValue ? FontWeight.Bold : FontWeight.Medium);
|
||||||
text.Colour = active.NewValue ? colours.BlueLighter : Color4.White;
|
text.Colour = active.NewValue ? colourProvider.Light1 : Color4.White;
|
||||||
}, true);
|
}, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5,7 +5,6 @@ using osu.Framework.Graphics.Containers;
|
|||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Framework.Graphics.Shapes;
|
using osu.Framework.Graphics.Shapes;
|
||||||
using osu.Game.Graphics;
|
using osu.Game.Graphics;
|
||||||
using osu.Framework.Graphics.Sprites;
|
|
||||||
using osuTK;
|
using osuTK;
|
||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
using osu.Framework.Bindables;
|
using osu.Framework.Bindables;
|
||||||
@ -17,9 +16,10 @@ namespace osu.Game.Overlays.Comments
|
|||||||
{
|
{
|
||||||
public readonly BindableInt Current = new BindableInt();
|
public readonly BindableInt Current = new BindableInt();
|
||||||
|
|
||||||
private readonly SpriteText counter;
|
private OsuSpriteText counter;
|
||||||
|
|
||||||
public TotalCommentsCounter()
|
[BackgroundDependencyLoader]
|
||||||
|
private void load(OverlayColourProvider colourProvider)
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.X;
|
RelativeSizeAxes = Axes.X;
|
||||||
Height = 50;
|
Height = 50;
|
||||||
@ -38,6 +38,7 @@ namespace osu.Game.Overlays.Comments
|
|||||||
Anchor = Anchor.CentreLeft,
|
Anchor = Anchor.CentreLeft,
|
||||||
Origin = Anchor.CentreLeft,
|
Origin = Anchor.CentreLeft,
|
||||||
Font = OsuFont.GetFont(size: 20, italics: true),
|
Font = OsuFont.GetFont(size: 20, italics: true),
|
||||||
|
Colour = colourProvider.Light1,
|
||||||
Text = @"Comments"
|
Text = @"Comments"
|
||||||
},
|
},
|
||||||
new CircularContainer
|
new CircularContainer
|
||||||
@ -51,14 +52,15 @@ namespace osu.Game.Overlays.Comments
|
|||||||
new Box
|
new Box
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
Colour = OsuColour.Gray(0.05f)
|
Colour = colourProvider.Background6
|
||||||
},
|
},
|
||||||
counter = new OsuSpriteText
|
counter = new OsuSpriteText
|
||||||
{
|
{
|
||||||
Anchor = Anchor.Centre,
|
Anchor = Anchor.Centre,
|
||||||
Origin = Anchor.Centre,
|
Origin = Anchor.Centre,
|
||||||
Margin = new MarginPadding { Horizontal = 10, Vertical = 5 },
|
Margin = new MarginPadding { Horizontal = 10, Vertical = 5 },
|
||||||
Font = OsuFont.GetFont(size: 14, weight: FontWeight.Bold)
|
Font = OsuFont.GetFont(size: 14, weight: FontWeight.Bold),
|
||||||
|
Colour = colourProvider.Foreground1
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
@ -66,12 +68,6 @@ namespace osu.Game.Overlays.Comments
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
|
||||||
private void load(OsuColour colours)
|
|
||||||
{
|
|
||||||
counter.Colour = colours.BlueLighter;
|
|
||||||
}
|
|
||||||
|
|
||||||
protected override void LoadComplete()
|
protected override void LoadComplete()
|
||||||
{
|
{
|
||||||
Current.BindValueChanged(value => counter.Text = value.NewValue.ToString("N0"), true);
|
Current.BindValueChanged(value => counter.Text = value.NewValue.ToString("N0"), true);
|
||||||
|
@ -1,11 +1,8 @@
|
|||||||
// 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.Allocation;
|
|
||||||
using osu.Framework.Bindables;
|
using osu.Framework.Bindables;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Framework.Graphics.Sprites;
|
|
||||||
using osu.Framework.Graphics.Textures;
|
|
||||||
using osu.Game.Graphics.UserInterface;
|
using osu.Game.Graphics.UserInterface;
|
||||||
using System;
|
using System;
|
||||||
|
|
||||||
@ -53,25 +50,10 @@ namespace osu.Game.Overlays.News
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override Drawable CreateBackground() => new NewsHeaderBackground();
|
protected override Drawable CreateBackground() => new OverlayHeaderBackground(@"Headers/news");
|
||||||
|
|
||||||
protected override ScreenTitle CreateTitle() => title = new NewsHeaderTitle();
|
protected override ScreenTitle CreateTitle() => title = new NewsHeaderTitle();
|
||||||
|
|
||||||
private class NewsHeaderBackground : Sprite
|
|
||||||
{
|
|
||||||
public NewsHeaderBackground()
|
|
||||||
{
|
|
||||||
RelativeSizeAxes = Axes.Both;
|
|
||||||
FillMode = FillMode.Fill;
|
|
||||||
}
|
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
|
||||||
private void load(TextureStore textures)
|
|
||||||
{
|
|
||||||
Texture = textures.Get(@"Headers/news");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private class NewsHeaderTitle : ScreenTitle
|
private class NewsHeaderTitle : ScreenTitle
|
||||||
{
|
{
|
||||||
private const string post_string = "post";
|
private const string post_string = "post";
|
||||||
|
@ -14,16 +14,10 @@ namespace osu.Game.Overlays
|
|||||||
public abstract class OverlayHeader : Container
|
public abstract class OverlayHeader : Container
|
||||||
{
|
{
|
||||||
private readonly Box titleBackground;
|
private readonly Box titleBackground;
|
||||||
private readonly Container background;
|
|
||||||
private readonly ScreenTitle title;
|
private readonly ScreenTitle title;
|
||||||
|
|
||||||
protected readonly FillFlowContainer HeaderInfo;
|
protected readonly FillFlowContainer HeaderInfo;
|
||||||
|
|
||||||
protected float BackgroundHeight
|
|
||||||
{
|
|
||||||
set => background.Height = value;
|
|
||||||
}
|
|
||||||
|
|
||||||
protected OverlayHeader()
|
protected OverlayHeader()
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.X;
|
RelativeSizeAxes = Axes.X;
|
||||||
@ -42,15 +36,9 @@ namespace osu.Game.Overlays
|
|||||||
AutoSizeAxes = Axes.Y,
|
AutoSizeAxes = Axes.Y,
|
||||||
Direction = FillDirection.Vertical,
|
Direction = FillDirection.Vertical,
|
||||||
Depth = -float.MaxValue,
|
Depth = -float.MaxValue,
|
||||||
Children = new Drawable[]
|
Children = new[]
|
||||||
{
|
{
|
||||||
background = new Container
|
CreateBackground(),
|
||||||
{
|
|
||||||
RelativeSizeAxes = Axes.X,
|
|
||||||
Height = 80,
|
|
||||||
Masking = true,
|
|
||||||
Child = CreateBackground()
|
|
||||||
},
|
|
||||||
new Container
|
new Container
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.X,
|
RelativeSizeAxes = Axes.X,
|
||||||
@ -86,10 +74,11 @@ namespace osu.Game.Overlays
|
|||||||
title.AccentColour = colourProvider.Highlight1;
|
title.AccentColour = colourProvider.Highlight1;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected abstract Drawable CreateBackground();
|
[NotNull]
|
||||||
|
protected virtual Drawable CreateContent() => Drawable.Empty();
|
||||||
|
|
||||||
[NotNull]
|
[NotNull]
|
||||||
protected virtual Drawable CreateContent() => new Container();
|
protected virtual Drawable CreateBackground() => Drawable.Empty();
|
||||||
|
|
||||||
protected abstract ScreenTitle CreateTitle();
|
protected abstract ScreenTitle CreateTitle();
|
||||||
}
|
}
|
||||||
|
43
osu.Game/Overlays/OverlayHeaderBackground.cs
Normal file
43
osu.Game/Overlays/OverlayHeaderBackground.cs
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
// 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.Graphics;
|
||||||
|
using osu.Framework.Graphics.Containers;
|
||||||
|
using osu.Framework.Graphics.Sprites;
|
||||||
|
using osu.Framework.Graphics.Textures;
|
||||||
|
|
||||||
|
namespace osu.Game.Overlays
|
||||||
|
{
|
||||||
|
public class OverlayHeaderBackground : CompositeDrawable
|
||||||
|
{
|
||||||
|
public OverlayHeaderBackground(string textureName)
|
||||||
|
{
|
||||||
|
Height = 80;
|
||||||
|
RelativeSizeAxes = Axes.X;
|
||||||
|
Masking = true;
|
||||||
|
InternalChild = new Background(textureName);
|
||||||
|
}
|
||||||
|
|
||||||
|
private class Background : Sprite
|
||||||
|
{
|
||||||
|
private readonly string textureName;
|
||||||
|
|
||||||
|
public Background(string textureName)
|
||||||
|
{
|
||||||
|
this.textureName = textureName;
|
||||||
|
|
||||||
|
Anchor = Anchor.Centre;
|
||||||
|
Origin = Anchor.Centre;
|
||||||
|
RelativeSizeAxes = Axes.Both;
|
||||||
|
FillMode = FillMode.Fill;
|
||||||
|
}
|
||||||
|
|
||||||
|
[BackgroundDependencyLoader]
|
||||||
|
private void load(TextureStore textures)
|
||||||
|
{
|
||||||
|
Texture = textures.Get(textureName);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -25,8 +25,6 @@ namespace osu.Game.Overlays.Profile
|
|||||||
|
|
||||||
public ProfileHeader()
|
public ProfileHeader()
|
||||||
{
|
{
|
||||||
BackgroundHeight = 150;
|
|
||||||
|
|
||||||
User.ValueChanged += e => updateDisplay(e.NewValue);
|
User.ValueChanged += e => updateDisplay(e.NewValue);
|
||||||
|
|
||||||
TabControl.AddItem("info");
|
TabControl.AddItem("info");
|
||||||
@ -38,7 +36,9 @@ namespace osu.Game.Overlays.Profile
|
|||||||
protected override Drawable CreateBackground() =>
|
protected override Drawable CreateBackground() =>
|
||||||
new Container
|
new Container
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.X,
|
||||||
|
Height = 150,
|
||||||
|
Masking = true,
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
coverContainer = new UserCoverBackground
|
coverContainer = new UserCoverBackground
|
||||||
|
@ -17,10 +17,34 @@ namespace osu.Game.Overlays.Settings.Sections.Audio
|
|||||||
{
|
{
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
new SettingsSlider<double> { LabelText = "Master", Bindable = audio.Volume, KeyboardStep = 0.01f },
|
new SettingsSlider<double>
|
||||||
new SettingsSlider<double> { LabelText = "Master (window inactive)", Bindable = config.GetBindable<double>(OsuSetting.VolumeInactive), KeyboardStep = 0.01f },
|
{
|
||||||
new SettingsSlider<double> { LabelText = "Effect", Bindable = audio.VolumeSample, KeyboardStep = 0.01f },
|
LabelText = "Master",
|
||||||
new SettingsSlider<double> { LabelText = "Music", Bindable = audio.VolumeTrack, KeyboardStep = 0.01f },
|
Bindable = audio.Volume,
|
||||||
|
KeyboardStep = 0.01f,
|
||||||
|
DisplayAsPercentage = true
|
||||||
|
},
|
||||||
|
new SettingsSlider<double>
|
||||||
|
{
|
||||||
|
LabelText = "Master (window inactive)",
|
||||||
|
Bindable = config.GetBindable<double>(OsuSetting.VolumeInactive),
|
||||||
|
KeyboardStep = 0.01f,
|
||||||
|
DisplayAsPercentage = true
|
||||||
|
},
|
||||||
|
new SettingsSlider<double>
|
||||||
|
{
|
||||||
|
LabelText = "Effect",
|
||||||
|
Bindable = audio.VolumeSample,
|
||||||
|
KeyboardStep = 0.01f,
|
||||||
|
DisplayAsPercentage = true
|
||||||
|
},
|
||||||
|
new SettingsSlider<double>
|
||||||
|
{
|
||||||
|
LabelText = "Music",
|
||||||
|
Bindable = audio.VolumeTrack,
|
||||||
|
KeyboardStep = 0.01f,
|
||||||
|
DisplayAsPercentage = true
|
||||||
|
},
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -21,13 +21,15 @@ namespace osu.Game.Overlays.Settings.Sections.Gameplay
|
|||||||
{
|
{
|
||||||
LabelText = "Background dim",
|
LabelText = "Background dim",
|
||||||
Bindable = config.GetBindable<double>(OsuSetting.DimLevel),
|
Bindable = config.GetBindable<double>(OsuSetting.DimLevel),
|
||||||
KeyboardStep = 0.01f
|
KeyboardStep = 0.01f,
|
||||||
|
DisplayAsPercentage = true
|
||||||
},
|
},
|
||||||
new SettingsSlider<double>
|
new SettingsSlider<double>
|
||||||
{
|
{
|
||||||
LabelText = "Background blur",
|
LabelText = "Background blur",
|
||||||
Bindable = config.GetBindable<double>(OsuSetting.BlurLevel),
|
Bindable = config.GetBindable<double>(OsuSetting.BlurLevel),
|
||||||
KeyboardStep = 0.01f
|
KeyboardStep = 0.01f,
|
||||||
|
DisplayAsPercentage = true
|
||||||
},
|
},
|
||||||
new SettingsCheckbox
|
new SettingsCheckbox
|
||||||
{
|
{
|
||||||
|
@ -98,25 +98,29 @@ namespace osu.Game.Overlays.Settings.Sections.Graphics
|
|||||||
{
|
{
|
||||||
LabelText = "Horizontal position",
|
LabelText = "Horizontal position",
|
||||||
Bindable = scalingPositionX,
|
Bindable = scalingPositionX,
|
||||||
KeyboardStep = 0.01f
|
KeyboardStep = 0.01f,
|
||||||
|
DisplayAsPercentage = true
|
||||||
},
|
},
|
||||||
new SettingsSlider<float>
|
new SettingsSlider<float>
|
||||||
{
|
{
|
||||||
LabelText = "Vertical position",
|
LabelText = "Vertical position",
|
||||||
Bindable = scalingPositionY,
|
Bindable = scalingPositionY,
|
||||||
KeyboardStep = 0.01f
|
KeyboardStep = 0.01f,
|
||||||
|
DisplayAsPercentage = true
|
||||||
},
|
},
|
||||||
new SettingsSlider<float>
|
new SettingsSlider<float>
|
||||||
{
|
{
|
||||||
LabelText = "Horizontal scale",
|
LabelText = "Horizontal scale",
|
||||||
Bindable = scalingSizeX,
|
Bindable = scalingSizeX,
|
||||||
KeyboardStep = 0.01f
|
KeyboardStep = 0.01f,
|
||||||
|
DisplayAsPercentage = true
|
||||||
},
|
},
|
||||||
new SettingsSlider<float>
|
new SettingsSlider<float>
|
||||||
{
|
{
|
||||||
LabelText = "Vertical scale",
|
LabelText = "Vertical scale",
|
||||||
Bindable = scalingSizeY,
|
Bindable = scalingSizeY,
|
||||||
KeyboardStep = 0.01f
|
KeyboardStep = 0.01f,
|
||||||
|
DisplayAsPercentage = true
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
|
|
||||||
using System;
|
using System;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
|
using osu.Framework.Graphics.UserInterface;
|
||||||
using osu.Game.Graphics.UserInterface;
|
using osu.Game.Graphics.UserInterface;
|
||||||
|
|
||||||
namespace osu.Game.Overlays.Settings
|
namespace osu.Game.Overlays.Settings
|
||||||
@ -22,16 +23,32 @@ namespace osu.Game.Overlays.Settings
|
|||||||
RelativeSizeAxes = Axes.X
|
RelativeSizeAxes = Axes.X
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// When set, value changes based on user input are only transferred to any bound control's Current on commit.
|
||||||
|
/// This is useful if the UI interaction could be adversely affected by the value changing, such as the position of the <see cref="SliderBar{T}"/> on the screen.
|
||||||
|
/// </summary>
|
||||||
public bool TransferValueOnCommit
|
public bool TransferValueOnCommit
|
||||||
{
|
{
|
||||||
get => ((TSlider)Control).TransferValueOnCommit;
|
get => ((TSlider)Control).TransferValueOnCommit;
|
||||||
set => ((TSlider)Control).TransferValueOnCommit = value;
|
set => ((TSlider)Control).TransferValueOnCommit = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// A custom step value for each key press which actuates a change on this control.
|
||||||
|
/// </summary>
|
||||||
public float KeyboardStep
|
public float KeyboardStep
|
||||||
{
|
{
|
||||||
get => ((TSlider)Control).KeyboardStep;
|
get => ((TSlider)Control).KeyboardStep;
|
||||||
set => ((TSlider)Control).KeyboardStep = value;
|
set => ((TSlider)Control).KeyboardStep = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Whether to format the tooltip as a percentage or the actual value.
|
||||||
|
/// </summary>
|
||||||
|
public bool DisplayAsPercentage
|
||||||
|
{
|
||||||
|
get => ((TSlider)Control).DisplayAsPercentage;
|
||||||
|
set => ((TSlider)Control).DisplayAsPercentage = value;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -27,12 +27,18 @@ namespace osu.Game.Screens.Play.PlayerSettings
|
|||||||
{
|
{
|
||||||
Text = "Background dim:"
|
Text = "Background dim:"
|
||||||
},
|
},
|
||||||
dimSliderBar = new PlayerSliderBar<double>(),
|
dimSliderBar = new PlayerSliderBar<double>
|
||||||
|
{
|
||||||
|
DisplayAsPercentage = true
|
||||||
|
},
|
||||||
new OsuSpriteText
|
new OsuSpriteText
|
||||||
{
|
{
|
||||||
Text = "Background blur:"
|
Text = "Background blur:"
|
||||||
},
|
},
|
||||||
blurSliderBar = new PlayerSliderBar<double>(),
|
blurSliderBar = new PlayerSliderBar<double>
|
||||||
|
{
|
||||||
|
DisplayAsPercentage = true
|
||||||
|
},
|
||||||
new OsuSpriteText
|
new OsuSpriteText
|
||||||
{
|
{
|
||||||
Text = "Toggles:"
|
Text = "Toggles:"
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
|
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
|
||||||
<s:Boolean x:Key="/Default/CodeInspection/ExcludedFiles/FileMasksToSkip/=_002A_002Efnt/@EntryIndexedValue">True</s:Boolean>
|
<s:Boolean x:Key="/Default/CodeInspection/ExcludedFiles/FileMasksToSkip/=_002A_002Efnt/@EntryIndexedValue">True</s:Boolean>
|
||||||
<s:Boolean x:Key="/Default/CodeInspection/ExcludedFiles/FileMasksToSkip/=_002A_002Emp3/@EntryIndexedValue">True</s:Boolean>
|
<s:Boolean x:Key="/Default/CodeInspection/ExcludedFiles/FileMasksToSkip/=_002A_002Emp3/@EntryIndexedValue">True</s:Boolean>
|
||||||
<s:Boolean x:Key="/Default/CodeInspection/ExcludedFiles/FileMasksToSkip/=_002A_002Epng/@EntryIndexedValue">True</s:Boolean>
|
<s:Boolean x:Key="/Default/CodeInspection/ExcludedFiles/FileMasksToSkip/=_002A_002Epng/@EntryIndexedValue">True</s:Boolean>
|
||||||
@ -245,7 +245,7 @@
|
|||||||
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpCodeStyle/BRACES_FOR_WHILE/@EntryValue">RequiredForMultiline</s:String>
|
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpCodeStyle/BRACES_FOR_WHILE/@EntryValue">RequiredForMultiline</s:String>
|
||||||
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpCodeStyle/DEFAULT_INTERNAL_MODIFIER/@EntryValue">Explicit</s:String>
|
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpCodeStyle/DEFAULT_INTERNAL_MODIFIER/@EntryValue">Explicit</s:String>
|
||||||
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpCodeStyle/LOCAL_FUNCTION_BODY/@EntryValue">ExpressionBody</s:String>
|
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpCodeStyle/LOCAL_FUNCTION_BODY/@EntryValue">ExpressionBody</s:String>
|
||||||
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpCodeStyle/METHOD_OR_OPERATOR_BODY/@EntryValue">ExpressionBody</s:String>
|
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpCodeStyle/METHOD_OR_OPERATOR_BODY/@EntryValue">BlockBody</s:String>
|
||||||
<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpCodeStyle/USE_HEURISTICS_FOR_BODY_STYLE/@EntryValue">True</s:Boolean>
|
<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpCodeStyle/USE_HEURISTICS_FOR_BODY_STYLE/@EntryValue">True</s:Boolean>
|
||||||
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/ACCESSOR_DECLARATION_BRACES/@EntryValue">NEXT_LINE</s:String>
|
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/ACCESSOR_DECLARATION_BRACES/@EntryValue">NEXT_LINE</s:String>
|
||||||
<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/ALIGN_LINQ_QUERY/@EntryValue">True</s:Boolean>
|
<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/ALIGN_LINQ_QUERY/@EntryValue">True</s:Boolean>
|
||||||
|
Loading…
Reference in New Issue
Block a user