mirror of
https://github.com/ppy/osu.git
synced 2025-01-29 01:22:54 +08:00
Only exit dialog from click if outside the dialog content
This commit is contained in:
parent
288f759bb4
commit
56c4283764
@ -60,6 +60,8 @@ namespace osu.Game.Overlays
|
|||||||
new FirstRunStep(typeof(ScreenSetupUIScale), "UI Scale"),
|
new FirstRunStep(typeof(ScreenSetupUIScale), "UI Scale"),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
private Container mainContent;
|
||||||
|
|
||||||
public FirstRunSetupOverlay()
|
public FirstRunSetupOverlay()
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both;
|
RelativeSizeAxes = Axes.Both;
|
||||||
@ -70,7 +72,7 @@ namespace osu.Game.Overlays
|
|||||||
{
|
{
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
new Container
|
mainContent = new Container
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
Anchor = Anchor.Centre,
|
Anchor = Anchor.Centre,
|
||||||
@ -228,7 +230,7 @@ namespace osu.Game.Overlays
|
|||||||
|
|
||||||
protected override bool OnClick(ClickEvent e)
|
protected override bool OnClick(ClickEvent e)
|
||||||
{
|
{
|
||||||
if (dialogOverlay?.CurrentDialog == null)
|
if (!mainContent.IsHovered && dialogOverlay?.CurrentDialog == null)
|
||||||
{
|
{
|
||||||
dialogOverlay?.Push(new ConfirmDialog("Are you sure you want to exit the setup process?",
|
dialogOverlay?.Push(new ConfirmDialog("Are you sure you want to exit the setup process?",
|
||||||
Hide,
|
Hide,
|
||||||
|
Loading…
Reference in New Issue
Block a user