Browse Source

Fixed NotificationWMCloseRequest c# code

With Godot 4.0 the casing seems to have changed from Wm to WM.
Tobi-Mob 2 years ago
parent
commit
56ef128796
1 changed files with 2 additions and 2 deletions
  1. 2 2
      tutorials/inputs/handling_quit_requests.rst

+ 2 - 2
tutorials/inputs/handling_quit_requests.rst

@@ -41,7 +41,7 @@ Handling the notification is done as follows (on any node):
 
 
     public override void _Notification(int what)
     public override void _Notification(int what)
     {
     {
-        if (what == NotificationWmCloseRequest)
+        if (what == NotificationWMCloseRequest)
             GetTree().Quit(); // default behavior
             GetTree().Quit(); // default behavior
     }
     }
 
 
@@ -82,7 +82,7 @@ program termination, you should send the notification yourself:
 
 
  .. code-tab:: csharp
  .. code-tab:: csharp
 
 
-    GetTree().Root.PropagateNotification((int)NotificationWmCloseRequest);
+    GetTree().Root.PropagateNotification((int)NotificationWMCloseRequest);
 
 
 Sending this notification will inform all nodes about the program termination,
 Sending this notification will inform all nodes about the program termination,
 but will not terminate the program itself *unlike in 3.X*. In order to achieve
 but will not terminate the program itself *unlike in 3.X*. In order to achieve