mirror of
https://github.com/ppy/osu.git
synced 2024-12-05 09:42:54 +08:00
Add default value for input boxes in tournament editor screens
This commit is contained in:
parent
6dffa948d4
commit
c07e7da40f
@ -38,6 +38,12 @@ namespace osu.Game.Tournament.Screens.Editors
|
||||
{
|
||||
Model = round;
|
||||
|
||||
Model.Name.Default = Model.Name.Value;
|
||||
Model.Description.Default = Model.Description.Value;
|
||||
Model.StartDate.Default = Model.StartDate.Value;
|
||||
Model.BanCount.Default = Model.BanCount.Value;
|
||||
Model.BestOf.Default = Model.BestOf.Value;
|
||||
|
||||
Masking = true;
|
||||
CornerRadius = 10;
|
||||
|
||||
@ -232,7 +238,7 @@ namespace osu.Game.Tournament.Screens.Editors
|
||||
[BackgroundDependencyLoader]
|
||||
private void load()
|
||||
{
|
||||
beatmapId.Value = Model.ID;
|
||||
beatmapId.Default = beatmapId.Value = Model.ID;
|
||||
beatmapId.BindValueChanged(id =>
|
||||
{
|
||||
Model.ID = id.NewValue ?? 0;
|
||||
@ -263,7 +269,7 @@ namespace osu.Game.Tournament.Screens.Editors
|
||||
API.Queue(req);
|
||||
}, true);
|
||||
|
||||
mods.Value = Model.Mods;
|
||||
mods.Default = mods.Value = Model.Mods;
|
||||
mods.BindValueChanged(modString => Model.Mods = modString.NewValue);
|
||||
}
|
||||
|
||||
|
@ -221,7 +221,7 @@ namespace osu.Game.Tournament.Screens.Editors
|
||||
[BackgroundDependencyLoader]
|
||||
private void load()
|
||||
{
|
||||
beatmapId.Value = Model.ID;
|
||||
beatmapId.Default = beatmapId.Value = Model.ID;
|
||||
beatmapId.BindValueChanged(id =>
|
||||
{
|
||||
Model.ID = id.NewValue ?? 0;
|
||||
|
@ -283,7 +283,7 @@ namespace osu.Game.Tournament.Screens.Editors
|
||||
[BackgroundDependencyLoader]
|
||||
private void load()
|
||||
{
|
||||
playerId.Value = user.OnlineID;
|
||||
playerId.Default = playerId.Value = user.OnlineID;
|
||||
playerId.BindValueChanged(id =>
|
||||
{
|
||||
user.OnlineID = id.NewValue ?? 0;
|
||||
|
Loading…
Reference in New Issue
Block a user