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 @@ public class TestSceneCommentsHeader : OsuTestScene
typeof(SortSelector),
};
private readonly Bindable<SortCommentsBy> sort = new Bindable<SortCommentsBy>();
private readonly Bindable<CommentsSortCriteria> sort = new Bindable<CommentsSortCriteria>();
private readonly BindableBool showDeleted = new BindableBool();
public TestSceneCommentsHeader()
@ -31,9 +31,9 @@ public TestSceneCommentsHeader()
});
AddStep("Trigger ShowDeleted", () => showDeleted.Value = !showDeleted.Value);
AddStep("Select old", () => sort.Value = SortCommentsBy.Old);
AddStep("Select new", () => sort.Value = SortCommentsBy.New);
AddStep("Select top", () => sort.Value = SortCommentsBy.Top);
AddStep("Select old", () => sort.Value = CommentsSortCriteria.Old);
AddStep("Select new", () => sort.Value = CommentsSortCriteria.New);
AddStep("Select top", () => sort.Value = CommentsSortCriteria.Top);
}
}
}

View File

@ -20,7 +20,7 @@ public class CommentsHeader : CompositeDrawable
private const int padding = 50;
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();
private readonly Box background;

View File

@ -15,13 +15,13 @@
namespace osu.Game.Overlays.Comments
{
public class SortSelector : OsuTabControl<SortCommentsBy>
public class SortSelector : OsuTabControl<CommentsSortCriteria>
{
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
{
@ -35,11 +35,11 @@ public SortSelector()
AutoSizeAxes = Axes.Both;
}
private class SortTabItem : TabItem<SortCommentsBy>
private class SortTabItem : TabItem<CommentsSortCriteria>
{
private readonly TabContent content;
public SortTabItem(SortCommentsBy value)
public SortTabItem(CommentsSortCriteria value)
: base(value)
{
AutoSizeAxes = Axes.Both;
@ -64,7 +64,7 @@ private class TabContent : HeaderButton
private readonly SpriteText text;
public TabContent(SortCommentsBy value)
public TabContent(CommentsSortCriteria value)
{
Add(text = new SpriteText
{
@ -97,7 +97,7 @@ protected override void OnHoverLost(HoverLostEvent e)
}
}
public enum SortCommentsBy
public enum CommentsSortCriteria
{
New,
Old,