mirror of
https://github.com/ppy/osu.git
synced 2025-02-25 23:03:01 +08:00
Merge remote-tracking branch 'upstream/master' into add-chat-truncation
This commit is contained in:
commit
d0e8b1efce
@ -1,5 +1,7 @@
|
|||||||
<Project>
|
<Project>
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
|
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||||
|
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||||
<OutputPath>bin\$(Configuration)</OutputPath>
|
<OutputPath>bin\$(Configuration)</OutputPath>
|
||||||
<WarningLevel>4</WarningLevel>
|
<WarningLevel>4</WarningLevel>
|
||||||
<SchemaVersion>2.0</SchemaVersion>
|
<SchemaVersion>2.0</SchemaVersion>
|
||||||
@ -35,7 +37,7 @@
|
|||||||
<DebugType>None</DebugType>
|
<DebugType>None</DebugType>
|
||||||
<Optimize>True</Optimize>
|
<Optimize>True</Optimize>
|
||||||
<ErrorReport>prompt</ErrorReport>
|
<ErrorReport>prompt</ErrorReport>
|
||||||
<EnableLLVM>true</EnableLLVM>
|
<EnableLLVM>true</EnableLLVM>
|
||||||
<AndroidManagedSymbols>false</AndroidManagedSymbols>
|
<AndroidManagedSymbols>false</AndroidManagedSymbols>
|
||||||
<AndroidLinkMode>SdkOnly</AndroidLinkMode>
|
<AndroidLinkMode>SdkOnly</AndroidLinkMode>
|
||||||
<AndroidUseSharedRuntime>False</AndroidUseSharedRuntime>
|
<AndroidUseSharedRuntime>False</AndroidUseSharedRuntime>
|
||||||
|
@ -62,21 +62,31 @@ namespace osu.Game.Graphics.Containers
|
|||||||
|
|
||||||
protected override bool OnClick(ClickEvent e)
|
protected override bool OnClick(ClickEvent e)
|
||||||
{
|
{
|
||||||
closeIfOutside(e);
|
if (!base.ReceivePositionalInputAt(e.ScreenSpaceMousePosition))
|
||||||
|
Hide();
|
||||||
|
|
||||||
return base.OnClick(e);
|
return base.OnClick(e);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override bool OnDragEnd(DragEndEvent e)
|
private bool closeOnDragEnd;
|
||||||
{
|
|
||||||
closeIfOutside(e);
|
|
||||||
return base.OnDragEnd(e);
|
|
||||||
}
|
|
||||||
|
|
||||||
private void closeIfOutside(MouseEvent e)
|
protected override bool OnDragStart(DragStartEvent e)
|
||||||
{
|
{
|
||||||
if (!base.ReceivePositionalInputAt(e.ScreenSpaceMousePosition))
|
if (!base.ReceivePositionalInputAt(e.ScreenSpaceMousePosition))
|
||||||
|
closeOnDragEnd = true;
|
||||||
|
|
||||||
|
return base.OnDragStart(e);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override bool OnDragEnd(DragEndEvent e)
|
||||||
|
{
|
||||||
|
if (closeOnDragEnd)
|
||||||
|
{
|
||||||
Hide();
|
Hide();
|
||||||
|
closeOnDragEnd = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return base.OnDragEnd(e);
|
||||||
}
|
}
|
||||||
|
|
||||||
public virtual bool OnPressed(GlobalAction action)
|
public virtual bool OnPressed(GlobalAction action)
|
||||||
|
@ -313,5 +313,22 @@ namespace osu.Game.Screens.Play
|
|||||||
return base.OnMouseMove(e);
|
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