mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 08:33:21 +08:00
Exit from match screen on escape
This commit is contained in:
parent
91b83cd4b8
commit
d4f5a8507c
@ -19,10 +19,10 @@ namespace osu.Game.Online.Chat
|
||||
/// </summary>
|
||||
public class StandAloneChatDisplay : CompositeDrawable
|
||||
{
|
||||
private readonly bool postingTextbox;
|
||||
|
||||
public readonly Bindable<Channel> Channel = new Bindable<Channel>();
|
||||
|
||||
public Action Exit;
|
||||
|
||||
private readonly FocusedTextBox textbox;
|
||||
|
||||
protected ChannelManager ChannelManager;
|
||||
@ -31,6 +31,8 @@ namespace osu.Game.Online.Chat
|
||||
|
||||
private DrawableChannel drawableChannel;
|
||||
|
||||
private readonly bool postingTextbox;
|
||||
|
||||
private const float textbox_height = 30;
|
||||
|
||||
/// <summary>
|
||||
@ -66,6 +68,8 @@ namespace osu.Game.Online.Chat
|
||||
Anchor = Anchor.BottomLeft,
|
||||
Origin = Anchor.BottomLeft,
|
||||
});
|
||||
|
||||
textbox.Exit += () => Exit?.Invoke();
|
||||
}
|
||||
|
||||
Channel.BindValueChanged(channelChanged);
|
||||
|
@ -28,6 +28,7 @@ namespace osu.Game.Screens.Multi.Match
|
||||
private readonly RoomBindings bindings = new RoomBindings();
|
||||
|
||||
private readonly MatchLeaderboard leaderboard;
|
||||
|
||||
private readonly Action<Screen> pushGameplayScreen;
|
||||
|
||||
[Cached]
|
||||
@ -49,6 +50,7 @@ namespace osu.Game.Screens.Multi.Match
|
||||
|
||||
bindings.Room = room;
|
||||
|
||||
MatchChatDisplay chat;
|
||||
Components.Header header;
|
||||
RoomSettingsOverlay settings;
|
||||
|
||||
@ -71,7 +73,7 @@ namespace osu.Game.Screens.Multi.Match
|
||||
new Drawable[]
|
||||
{
|
||||
leaderboard = new MatchLeaderboard(room) { RelativeSizeAxes = Axes.Both },
|
||||
new MatchChatDisplay(room) { RelativeSizeAxes = Axes.Both }
|
||||
chat = new MatchChatDisplay(room) { RelativeSizeAxes = Axes.Both }
|
||||
},
|
||||
},
|
||||
}
|
||||
@ -100,6 +102,8 @@ namespace osu.Game.Screens.Multi.Match
|
||||
else
|
||||
settings.Hide();
|
||||
};
|
||||
|
||||
chat.Exit += Exit;
|
||||
}
|
||||
|
||||
protected override void LoadComplete()
|
||||
|
Loading…
Reference in New Issue
Block a user