1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 16:12:57 +08:00

Rename SortCommentsBy to CommentsSortCriteria

This commit is contained in:
Andrei Zavatski 2019-10-10 15:56:08 +03:00
parent fe7b4037f7
commit b45e7246b8
3 changed files with 12 additions and 12 deletions

View File

@ -19,7 +19,7 @@ namespace osu.Game.Tests.Visual.Online
typeof(SortSelector), typeof(SortSelector),
}; };
private readonly Bindable<SortCommentsBy> sort = new Bindable<SortCommentsBy>(); private readonly Bindable<CommentsSortCriteria> sort = new Bindable<CommentsSortCriteria>();
private readonly BindableBool showDeleted = new BindableBool(); private readonly BindableBool showDeleted = new BindableBool();
public TestSceneCommentsHeader() public TestSceneCommentsHeader()
@ -31,9 +31,9 @@ namespace osu.Game.Tests.Visual.Online
}); });
AddStep("Trigger ShowDeleted", () => showDeleted.Value = !showDeleted.Value); AddStep("Trigger ShowDeleted", () => showDeleted.Value = !showDeleted.Value);
AddStep("Select old", () => sort.Value = SortCommentsBy.Old); AddStep("Select old", () => sort.Value = CommentsSortCriteria.Old);
AddStep("Select new", () => sort.Value = SortCommentsBy.New); AddStep("Select new", () => sort.Value = CommentsSortCriteria.New);
AddStep("Select top", () => sort.Value = SortCommentsBy.Top); AddStep("Select top", () => sort.Value = CommentsSortCriteria.Top);
} }
} }
} }

View File

@ -20,7 +20,7 @@ namespace osu.Game.Overlays.Comments
private const int padding = 50; private const int padding = 50;
private const int text_size = 14; private const int text_size = 14;
public readonly Bindable<SortCommentsBy> Sort = new Bindable<SortCommentsBy>(); public readonly Bindable<CommentsSortCriteria> Sort = new Bindable<CommentsSortCriteria>();
public readonly BindableBool ShowDeleted = new BindableBool(); public readonly BindableBool ShowDeleted = new BindableBool();
private readonly Box background; private readonly Box background;

View File

@ -15,13 +15,13 @@ using osuTK.Graphics;
namespace osu.Game.Overlays.Comments namespace osu.Game.Overlays.Comments
{ {
public class SortSelector : OsuTabControl<SortCommentsBy> public class SortSelector : OsuTabControl<CommentsSortCriteria>
{ {
private const int spacing = 5; private const int spacing = 5;
protected override Dropdown<SortCommentsBy> CreateDropdown() => null; protected override Dropdown<CommentsSortCriteria> CreateDropdown() => null;
protected override TabItem<SortCommentsBy> CreateTabItem(SortCommentsBy value) => new SortTabItem(value); protected override TabItem<CommentsSortCriteria> CreateTabItem(CommentsSortCriteria value) => new SortTabItem(value);
protected override TabFillFlowContainer CreateTabFlow() => new TabFillFlowContainer protected override TabFillFlowContainer CreateTabFlow() => new TabFillFlowContainer
{ {
@ -35,11 +35,11 @@ namespace osu.Game.Overlays.Comments
AutoSizeAxes = Axes.Both; AutoSizeAxes = Axes.Both;
} }
private class SortTabItem : TabItem<SortCommentsBy> private class SortTabItem : TabItem<CommentsSortCriteria>
{ {
private readonly TabContent content; private readonly TabContent content;
public SortTabItem(SortCommentsBy value) public SortTabItem(CommentsSortCriteria value)
: base(value) : base(value)
{ {
AutoSizeAxes = Axes.Both; AutoSizeAxes = Axes.Both;
@ -64,7 +64,7 @@ namespace osu.Game.Overlays.Comments
private readonly SpriteText text; private readonly SpriteText text;
public TabContent(SortCommentsBy value) public TabContent(CommentsSortCriteria value)
{ {
Add(text = new SpriteText Add(text = new SpriteText
{ {
@ -97,7 +97,7 @@ namespace osu.Game.Overlays.Comments
} }
} }
public enum SortCommentsBy public enum CommentsSortCriteria
{ {
New, New,
Old, Old,