mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 17:07:38 +08:00
Fix toggle not toggling on pressing escape
Also add comment about hacky implementation of toggle tab.
This commit is contained in:
parent
778865b6eb
commit
16fcfc473d
@ -210,8 +210,10 @@ namespace osu.Game.Overlays.Chat
|
||||
get { return false; }
|
||||
set
|
||||
{
|
||||
// we basically never want this tab to become active.
|
||||
// this allows us to become a "toggle" tab.
|
||||
// is a bit hacky, to say the least.
|
||||
activeBindable.Value = !activeBindable.Value;
|
||||
selectorUpdateState();
|
||||
base.Active = false;
|
||||
}
|
||||
}
|
||||
@ -221,6 +223,9 @@ namespace osu.Game.Overlays.Chat
|
||||
public ChannelSelectorTabItem(Channel value, Bindable<bool> active) : base(value)
|
||||
{
|
||||
activeBindable = active;
|
||||
activeBindable.ValueChanged += v => selectorUpdateState();
|
||||
|
||||
|
||||
Depth = float.MaxValue;
|
||||
Width = 45;
|
||||
|
||||
|
@ -166,6 +166,8 @@ namespace osu.Game.Overlays
|
||||
channelTabs.ChannelSelectorActive.ValueChanged += value => channelSelection.State = value ? Visibility.Visible : Visibility.Hidden;
|
||||
channelSelection.StateChanged += (overlay, state) =>
|
||||
{
|
||||
channelTabs.ChannelSelectorActive.Value = state == Visibility.Visible;
|
||||
|
||||
if (state == Visibility.Visible)
|
||||
{
|
||||
inputTextBox.HoldFocus = false;
|
||||
|
Loading…
Reference in New Issue
Block a user