fix: unsubscribe VisibilityChanged in _ExitTree, use IsActionReleased for ui_cancel, expose ApplyGamepadDeadzone public
This commit is contained in:
@@ -43,6 +43,7 @@ public partial class SettingsMenu : Control
|
||||
{
|
||||
if (InputDeviceManager.Instance != null)
|
||||
InputDeviceManager.Instance.DeviceChanged -= OnDeviceChanged;
|
||||
VisibilityChanged -= OnVisibilityChanged;
|
||||
}
|
||||
|
||||
private void OnVisibilityChanged()
|
||||
@@ -62,7 +63,7 @@ public partial class SettingsMenu : Control
|
||||
|
||||
public override void _UnhandledInput(InputEvent @event)
|
||||
{
|
||||
if (!@event.IsActionPressed("ui_cancel")) return;
|
||||
if (!@event.IsActionReleased("ui_cancel")) return;
|
||||
if (UIManager.IsScreenOnTop(SettingsMenuControl)) UIManager.PopScreen();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user