mirror of
https://github.com/ppy/osu.git
synced 2025-01-29 01:22:54 +08:00
Merge pull request #4081 from peppy/fix-room-inspector-cover
Fix room inspector cover not resetting when no room selected
This commit is contained in:
commit
b58a61b277
@ -93,10 +93,14 @@ namespace osu.Game.Screens.Multi.Lounge.Components
|
|||||||
Host.BindValueChanged(v =>
|
Host.BindValueChanged(v =>
|
||||||
{
|
{
|
||||||
hostText.Clear();
|
hostText.Clear();
|
||||||
hostText.AddText("hosted by ");
|
flagContainer.Clear();
|
||||||
hostText.AddLink(v.Username, null, LinkAction.OpenUserProfile, v.Id.ToString(), "Open profile", s => s.Font = "Exo2.0-BoldItalic");
|
|
||||||
|
|
||||||
flagContainer.Child = new DrawableFlag(v.Country) { RelativeSizeAxes = Axes.Both };
|
if (v != null)
|
||||||
|
{
|
||||||
|
hostText.AddText("hosted by ");
|
||||||
|
hostText.AddLink(v.Username, null, LinkAction.OpenUserProfile, v.Id.ToString(), "Open profile", s => s.Font = "Exo2.0-BoldItalic");
|
||||||
|
flagContainer.Child = new DrawableFlag(v.Country) { RelativeSizeAxes = Axes.Both };
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
ParticipantCount.BindValueChanged(v => summary.Text = $"{v:#,0}{" participant".Pluralize(v == 1)}");
|
ParticipantCount.BindValueChanged(v => summary.Text = $"{v:#,0}{" participant".Pluralize(v == 1)}");
|
||||||
|
@ -53,23 +53,20 @@ namespace osu.Game.Screens.Multi
|
|||||||
Duration.UnbindFrom(room.Duration);
|
Duration.UnbindFrom(room.Duration);
|
||||||
}
|
}
|
||||||
|
|
||||||
room = value;
|
room = value ?? new Room();
|
||||||
|
|
||||||
if (room != null)
|
RoomID.BindTo(room.RoomID);
|
||||||
{
|
Name.BindTo(room.Name);
|
||||||
RoomID.BindTo(room.RoomID);
|
Host.BindTo(room.Host);
|
||||||
Name.BindTo(room.Name);
|
Status.BindTo(room.Status);
|
||||||
Host.BindTo(room.Host);
|
Type.BindTo(room.Type);
|
||||||
Status.BindTo(room.Status);
|
Playlist.BindTo(room.Playlist);
|
||||||
Type.BindTo(room.Type);
|
Participants.BindTo(room.Participants);
|
||||||
Playlist.BindTo(room.Playlist);
|
ParticipantCount.BindTo(room.ParticipantCount);
|
||||||
Participants.BindTo(room.Participants);
|
MaxParticipants.BindTo(room.MaxParticipants);
|
||||||
ParticipantCount.BindTo(room.ParticipantCount);
|
EndDate.BindTo(room.EndDate);
|
||||||
MaxParticipants.BindTo(room.MaxParticipants);
|
Availability.BindTo(room.Availability);
|
||||||
EndDate.BindTo(room.EndDate);
|
Duration.BindTo(room.Duration);
|
||||||
Availability.BindTo(room.Availability);
|
|
||||||
Duration.BindTo(room.Duration);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user