فهرست منبع

Fix grammar and punctuation in custom_gui_controls

Fix grammar and punctuation in custom_gui_controls.
corrigentia 6 سال پیش
والد
کامیت
7fd74ae464
1فایلهای تغییر یافته به همراه26 افزوده شده و 26 حذف شده
  1. 26 26
      tutorials/gui/custom_gui_controls.rst

+ 26 - 26
tutorials/gui/custom_gui_controls.rst

@@ -7,7 +7,7 @@ So many controls...
 -------------------
 -------------------
 
 
 Yet there are never enough. Creating your own custom controls that act
 Yet there are never enough. Creating your own custom controls that act
-just the way you want them is an obsession of almost every GUI
+just the way you want them to is an obsession of almost every GUI
 programmer. Godot provides plenty of them, but they may not work exactly
 programmer. Godot provides plenty of them, but they may not work exactly
 the way you want. Before contacting the developers with a pull-request
 the way you want. Before contacting the developers with a pull-request
 to support diagonal scrollbars, at least it will be good to know how to
 to support diagonal scrollbars, at least it will be good to know how to
@@ -70,7 +70,7 @@ Sizing
 
 
 As mentioned before, size is important to controls. This allows
 As mentioned before, size is important to controls. This allows
 them to lay out properly, when set into grids, containers, or anchored.
 them to lay out properly, when set into grids, containers, or anchored.
-Controls most of the time provide a *minimum size* to help to properly
+Controls, most of the time, provide a *minimum size* to help properly
 lay them out. For example, if controls are placed vertically on top of
 lay them out. For example, if controls are placed vertically on top of
 each other using a :ref:`VBoxContainer <class_VBoxContainer>`,
 each other using a :ref:`VBoxContainer <class_VBoxContainer>`,
 the minimum size will make sure your custom control is not squished by
 the minimum size will make sure your custom control is not squished by
@@ -170,8 +170,8 @@ tutorial.
 Notifications
 Notifications
 ~~~~~~~~~~~~~
 ~~~~~~~~~~~~~
 
 
-Controls also have many useful notifications for which no callback
-exists, but can be checked with the _notification callback:
+Controls also have many useful notifications for which no dedicated callback
+exists, but which can be checked with the _notification callback:
 
 
 .. tabs::
 .. tabs::
  .. code-tab:: gdscript GDScript
  .. code-tab:: gdscript GDScript
@@ -179,25 +179,25 @@ exists, but can be checked with the _notification callback:
     func _notification(what):
     func _notification(what):
         match what:
         match what:
             NOTIFICATION_MOUSE_ENTER:
             NOTIFICATION_MOUSE_ENTER:
-                pass # mouse entered the area of this control
+                pass # Mouse entered the area of this control.
             NOTIFICATION_MOUSE_EXIT:
             NOTIFICATION_MOUSE_EXIT:
-                pass # mouse exited the area of this control
+                pass # Mouse exited the area of this control.
             NOTIFICATION_FOCUS_ENTER:
             NOTIFICATION_FOCUS_ENTER:
-                pass # control gained focus
+                pass # Control gained focus.
             NOTIFICATION_FOCUS_EXIT:
             NOTIFICATION_FOCUS_EXIT:
-                pass # control lost focus
+                pass # Control lost focus.
             NOTIFICATION_THEME_CHANGED:
             NOTIFICATION_THEME_CHANGED:
-                pass # theme used to draw the control changed
-                # update and redraw is recommended if using a theme
+                pass # Theme used to draw the control changed;
+                # update and redraw is recommended if using a theme.
             NOTIFICATION_VISIBILITY_CHANGED:
             NOTIFICATION_VISIBILITY_CHANGED:
-                pass # control became visible/invisible
-                # check new status with is_visible()
+                pass # Control became visible/invisible;
+                # check new status with is_visible().
             NOTIFICATION_RESIZED:
             NOTIFICATION_RESIZED:
-                pass # control changed size, check new size
-                # with get_size()
+                pass # Control changed size; check new size
+                # with get_size().
             NOTIFICATION_MODAL_CLOSED):
             NOTIFICATION_MODAL_CLOSED):
-                pass # for modal popups, notification
-                # that the popup was closed
+                pass # For modal pop-ups, notification
+                # that the pop-up was closed.
 
 
  .. code-tab:: csharp
  .. code-tab:: csharp
 
 
@@ -206,37 +206,37 @@ exists, but can be checked with the _notification callback:
         switch(what)
         switch(what)
         {
         {
             case NotificationMouseEnter:
             case NotificationMouseEnter:
-                // mouse entered the area of this control
+                // Mouse entered the area of this control.
                 break;
                 break;
 
 
             case NotificationMouseExit:
             case NotificationMouseExit:
-                // mouse exited the area of this control
+                // Mouse exited the area of this control.
                 break;
                 break;
 
 
             case NotificationFocusEnter:
             case NotificationFocusEnter:
-                // control gained focus
+                // Control gained focus.
                 break;
                 break;
 
 
             case NotificationFocusExit:
             case NotificationFocusExit:
-                // control lost focus
+                // Control lost focus.
                 break;
                 break;
 
 
             case NotificationThemeChanged:
             case NotificationThemeChanged:
-                // theme used to draw the control changed
-                // update and redraw is recommended if using a theme
+                // Theme used to draw the control changed;
+                // update and redraw is recommended if using a theme.
                 break;
                 break;
 
 
             case NotificationVisibilityChanged:
             case NotificationVisibilityChanged:
-                // control became visible/invisible
-                // check new status with is_visible()
+                // Control became visible/invisible;
+                // check new status with is_visible().
                 break;
                 break;
 
 
             case NotificationResized:
             case NotificationResized:
-                // control changed size, check new size with get_size()
+                // Control changed size; check new size with get_size().
                 break;
                 break;
 
 
             case NotificationModalClose:
             case NotificationModalClose:
-                // for modal popups, notification that the popup was closed
+                // For modal pop-ups, notification that the pop-up was closed.
                 break;
                 break;
         }
         }
     }
     }