fixt pop up box about unsaved porgrass
This commit is contained in:
@@ -108,12 +108,18 @@ namespace TheGame
|
||||
|
||||
public override void _Input(InputEvent @event)
|
||||
{
|
||||
if (!IsInsideTree())
|
||||
return;
|
||||
|
||||
if (@event is InputEventKey keyEvent && keyEvent.Pressed)
|
||||
{
|
||||
if (keyEvent.Keycode == Key.Escape)
|
||||
{
|
||||
OnCancelPressed();
|
||||
GetViewport().SetInputAsHandled();
|
||||
if (IsInsideTree())
|
||||
{
|
||||
GetViewport().SetInputAsHandled();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user