mirror of
https://github.com/osukey/osukey.git
synced 2025-05-30 01:47:30 +09:00
Fetch config bindables in BDL.
This commit is contained in:
parent
6ea10ada34
commit
ce5ee095b9
@ -29,9 +29,9 @@ namespace osu.Game.Screens.Select
|
|||||||
|
|
||||||
private readonly TabControl<GroupMode> groupTabs;
|
private readonly TabControl<GroupMode> groupTabs;
|
||||||
|
|
||||||
public readonly Bindable<SortMode> SortMode = new Bindable<SortMode>(Filter.SortMode.Title);
|
public Bindable<SortMode> SortMode;
|
||||||
|
|
||||||
public readonly Bindable<GroupMode> GroupMode = new Bindable<GroupMode>(Filter.GroupMode.All);
|
public Bindable<GroupMode> GroupMode;
|
||||||
|
|
||||||
public FilterCriteria CreateCriteria() => new FilterCriteria
|
public FilterCriteria CreateCriteria() => new FilterCriteria
|
||||||
{
|
{
|
||||||
@ -96,7 +96,6 @@ namespace osu.Game.Screens.Select
|
|||||||
Height = 24,
|
Height = 24,
|
||||||
Width = 0.5f,
|
Width = 0.5f,
|
||||||
AutoSort = true,
|
AutoSort = true,
|
||||||
Current = GroupMode
|
|
||||||
},
|
},
|
||||||
//spriteText = new OsuSpriteText
|
//spriteText = new OsuSpriteText
|
||||||
//{
|
//{
|
||||||
@ -115,7 +114,6 @@ namespace osu.Game.Screens.Select
|
|||||||
Width = 0.5f,
|
Width = 0.5f,
|
||||||
Height = 24,
|
Height = 24,
|
||||||
AutoSort = true,
|
AutoSort = true,
|
||||||
Current = SortMode
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -158,8 +156,11 @@ namespace osu.Game.Screens.Select
|
|||||||
ruleset.BindTo(parentRuleset);
|
ruleset.BindTo(parentRuleset);
|
||||||
ruleset.BindValueChanged(_ => updateCriteria());
|
ruleset.BindValueChanged(_ => updateCriteria());
|
||||||
|
|
||||||
config.BindWith(OsuSetting.SelectGroupingMode, GroupMode);
|
SortMode = config.GetBindable<SortMode>(OsuSetting.SelectSortingMode);
|
||||||
config.BindWith(OsuSetting.SelectSortingMode, SortMode);
|
GroupMode = config.GetBindable<GroupMode>(OsuSetting.SelectGroupingMode);
|
||||||
|
|
||||||
|
sortTabs.Current.BindTo(SortMode);
|
||||||
|
groupTabs.Current.BindTo(GroupMode);
|
||||||
|
|
||||||
GroupMode.BindValueChanged(_ => updateCriteria());
|
GroupMode.BindValueChanged(_ => updateCriteria());
|
||||||
SortMode.BindValueChanged(_ => updateCriteria());
|
SortMode.BindValueChanged(_ => updateCriteria());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user