mirror of
https://github.com/ppy/osu
synced 2025-01-31 10:22:02 +00:00
Merge remote-tracking branch 'upstream/master' into add-chat-truncation
This commit is contained in:
commit
d0e8b1efce
@ -1,5 +1,7 @@
|
||||
<Project>
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<OutputPath>bin\$(Configuration)</OutputPath>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
@ -35,7 +37,7 @@
|
||||
<DebugType>None</DebugType>
|
||||
<Optimize>True</Optimize>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<EnableLLVM>true</EnableLLVM>
|
||||
<EnableLLVM>true</EnableLLVM>
|
||||
<AndroidManagedSymbols>false</AndroidManagedSymbols>
|
||||
<AndroidLinkMode>SdkOnly</AndroidLinkMode>
|
||||
<AndroidUseSharedRuntime>False</AndroidUseSharedRuntime>
|
||||
|
@ -62,21 +62,31 @@ namespace osu.Game.Graphics.Containers
|
||||
|
||||
protected override bool OnClick(ClickEvent e)
|
||||
{
|
||||
closeIfOutside(e);
|
||||
if (!base.ReceivePositionalInputAt(e.ScreenSpaceMousePosition))
|
||||
Hide();
|
||||
|
||||
return base.OnClick(e);
|
||||
}
|
||||
|
||||
protected override bool OnDragEnd(DragEndEvent e)
|
||||
{
|
||||
closeIfOutside(e);
|
||||
return base.OnDragEnd(e);
|
||||
}
|
||||
private bool closeOnDragEnd;
|
||||
|
||||
private void closeIfOutside(MouseEvent e)
|
||||
protected override bool OnDragStart(DragStartEvent e)
|
||||
{
|
||||
if (!base.ReceivePositionalInputAt(e.ScreenSpaceMousePosition))
|
||||
closeOnDragEnd = true;
|
||||
|
||||
return base.OnDragStart(e);
|
||||
}
|
||||
|
||||
protected override bool OnDragEnd(DragEndEvent e)
|
||||
{
|
||||
if (closeOnDragEnd)
|
||||
{
|
||||
Hide();
|
||||
closeOnDragEnd = false;
|
||||
}
|
||||
|
||||
return base.OnDragEnd(e);
|
||||
}
|
||||
|
||||
public virtual bool OnPressed(GlobalAction action)
|
||||
|
@ -313,5 +313,22 @@ namespace osu.Game.Screens.Play
|
||||
return base.OnMouseMove(e);
|
||||
}
|
||||
}
|
||||
|
||||
[Resolved]
|
||||
private GlobalActionContainer globalAction { get; set; }
|
||||
|
||||
protected override bool Handle(UIEvent e)
|
||||
{
|
||||
switch (e)
|
||||
{
|
||||
case ScrollEvent _:
|
||||
if (ReceivePositionalInputAt(e.ScreenSpaceMousePosition))
|
||||
return globalAction.TriggerEvent(e);
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
return base.Handle(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user