检测游戏窗口失去焦点

func _notification(what):
    match what:
        MainLoop.NOTIFICATION_APPLICATION_FOCUS_OUT:
            print("out")
            pass
        MainLoop.NOTIFICATION_APPLICATION_FOCUS_IN:
            print("in")
            pass
    pass

你可能感兴趣的:(检测游戏窗口失去焦点)