Merge https://github.com/ppy/osu into channel-selection

This commit is contained in:
DrabWeb
2017-05-29 20:31:35 -03:00
51 changed files with 1474 additions and 209 deletions

View File

@ -145,17 +145,22 @@ namespace osu.Game.Overlays
channelTabs.Current.ValueChanged += newChannel => CurrentChannel = newChannel;
}
private double startDragChatHeight;
protected override bool OnDragStart(InputState state)
{
if (channelTabs.Hovering)
return true;
if (!channelTabs.Hovering)
return base.OnDragStart(state);
return base.OnDragStart(state);
startDragChatHeight = chatHeight.Value;
return true;
}
protected override bool OnDrag(InputState state)
{
chatHeight.Value = Height - state.Mouse.Delta.Y / Parent.DrawSize.Y;
Trace.Assert(state.Mouse.PositionMouseDown != null);
chatHeight.Value = startDragChatHeight - (state.Mouse.Position.Y - state.Mouse.PositionMouseDown.Value.Y) / Parent.DrawSize.Y;
return base.OnDrag(state);
}
@ -175,7 +180,7 @@ namespace osu.Game.Overlays
protected override bool OnFocus(InputState state)
{
//this is necessary as inputTextBox is masked away and therefore can't get focus :(
inputTextBox.TriggerFocus();
InputManager.ChangeFocus(inputTextBox);
return false;
}