Replace 3 occurrences of SpriteText.Current

This commit is contained in:
smoogipoo 2018-12-10 13:18:03 +09:00
parent feb1adb51d
commit 352a758f5c
3 changed files with 13 additions and 19 deletions

View File

@ -108,6 +108,7 @@ namespace osu.Game.Screens.Multi.Components
ParticipantInfo participantInfo;
BeatmapTitle beatmapTitle;
ModeTypeInfo modeTypeInfo;
OsuSpriteText name;
Children = new Drawable[]
{
@ -166,11 +167,7 @@ namespace osu.Game.Screens.Multi.Components
Spacing = new Vector2(5f),
Children = new Drawable[]
{
new OsuSpriteText
{
TextSize = 18,
Current = nameBind
},
name = new OsuSpriteText { TextSize = 18 },
participantInfo = new ParticipantInfo(),
},
},
@ -217,7 +214,8 @@ namespace osu.Game.Screens.Multi.Components
background.Beatmap.BindTo(beatmap);
beatmapBind.ValueChanged += b => beatmap.Value = beatmaps.GetWorkingBeatmap(b);
beatmapBind.BindValueChanged(b => beatmap.Value = beatmaps.GetWorkingBeatmap(b));
nameBind.BindValueChanged(n => name.Text = n);
nameBind.BindTo(Room.Name);
hostBind.BindTo(Room.Host);

View File

@ -131,7 +131,6 @@ namespace osu.Game.Screens.Multi.Components
Anchor = Anchor.BottomLeft,
Origin = Anchor.BottomLeft,
TextSize = 30,
Current = nameBind
},
},
},
@ -204,9 +203,11 @@ namespace osu.Game.Screens.Multi.Components
},
};
statusBind.ValueChanged += displayStatus;
beatmapBind.ValueChanged += b => beatmap.Value = beatmaps.GetWorkingBeatmap(b);
participantsBind.ValueChanged += p => participantsFlow.ChildrenEnumerable = p.Select(u => new UserTile(u));
statusBind.BindValueChanged(displayStatus);
beatmapBind.BindValueChanged(b => beatmap.Value = beatmaps.GetWorkingBeatmap(b));
participantsBind.BindValueChanged(p => participantsFlow.ChildrenEnumerable = p.Select(u => new UserTile(u)));
nameBind.BindValueChanged(n => name.Text = n);
background.Beatmap.BindTo(beatmap);

View File

@ -42,6 +42,7 @@ namespace osu.Game.Screens.Multi.Screens.Match
Height = HEIGHT;
BeatmapTypeInfo beatmapTypeInfo;
OsuSpriteText name;
Children = new Drawable[]
{
@ -69,15 +70,8 @@ namespace osu.Game.Screens.Multi.Screens.Match
Direction = FillDirection.Vertical,
Children = new Drawable[]
{
new OsuSpriteText
{
TextSize = 30,
Current = Name
},
availabilityStatus = new OsuSpriteText
{
TextSize = 14,
},
name = new OsuSpriteText { TextSize = 30 },
availabilityStatus = new OsuSpriteText { TextSize = 14 },
},
},
beatmapTypeInfo = new BeatmapTypeInfo
@ -104,6 +98,7 @@ namespace osu.Game.Screens.Multi.Screens.Match
Availability.BindValueChanged(_ => updateAvailabilityStatus());
Status.BindValueChanged(_ => updateAvailabilityStatus());
Name.BindValueChanged(n => name.Text = n);
}
[BackgroundDependencyLoader]