Browse Source

doc: Sync classref with current source

Rémi Verschelde 5 years ago
parent
commit
471271b727
4 changed files with 26 additions and 26 deletions
  1. 3 3
      doc/classes/InputEventKey.xml
  2. 16 16
      doc/classes/OS.xml
  3. 1 1
      doc/classes/Rect2.xml
  4. 6 6
      doc/classes/Semaphore.xml

+ 3 - 3
doc/classes/InputEventKey.xml

@@ -31,9 +31,6 @@
 		<member name="echo" type="bool" setter="set_echo" getter="is_echo" default="false">
 			If [code]true[/code], the key was already pressed before this event. It means the user is holding the key down.
 		</member>
-		<member name="pressed" type="bool" setter="set_pressed" getter="is_pressed" default="false">
-			If [code]true[/code], the key's state is pressed. If [code]false[/code], the key's state is released.
-		</member>
 		<member name="keycode" type="int" setter="set_keycode" getter="get_keycode" default="0">
 			The key keycode, which corresponds to one of the [enum KeyList] constants. Represent key in the current keyboard layout.
 			To get a human-readable representation of the [InputEventKey], use [code]OS.get_keycode_string(event.keycode)[/code] where [code]event[/code] is the [InputEventKey].
@@ -42,6 +39,9 @@
 			Key physical keycode, which corresponds to one of the [enum KeyList] constants. Represent the physical location of a key on the 101/102-key US QWERTY keyboard.
 			To get a human-readable representation of the [InputEventKey], use [code]OS.get_keycode_string(event.keycode)[/code] where [code]event[/code] is the [InputEventKey].
 		</member>
+		<member name="pressed" type="bool" setter="set_pressed" getter="is_pressed" default="false">
+			If [code]true[/code], the key's state is pressed. If [code]false[/code], the key's state is released.
+		</member>
 		<member name="unicode" type="int" setter="set_unicode" getter="get_unicode" default="0">
 			The key Unicode identifier (when relevant). Unicode identifiers for the composite characters and complex scripts may not be available unless IME input mode is active. See [method OS.set_ime_active] for more information.
 		</member>

+ 16 - 16
doc/classes/OS.xml

@@ -242,6 +242,16 @@
 				[b]Note:[/b] This method is implemented on macOS.
 			</description>
 		</method>
+		<method name="get_keycode_string" qualifiers="const">
+			<return type="String">
+			</return>
+			<argument index="0" name="code" type="int">
+			</argument>
+			<description>
+				Returns the given keycode as a string (e.g. Return values: [code]"Escape"[/code], [code]"Shift+Escape"[/code]).
+				See also [member InputEventKey.keycode] and [method InputEventKey.get_keycode_with_modifiers].
+			</description>
+		</method>
 		<method name="get_latin_keyboard_variant" qualifiers="const">
 			<return type="String">
 			</return>
@@ -295,16 +305,6 @@
 				Returns the window size including decorations like window borders.
 			</description>
 		</method>
-		<method name="get_keycode_string" qualifiers="const">
-			<return type="String">
-			</return>
-			<argument index="0" name="code" type="int">
-			</argument>
-			<description>
-				Returns the given keycode as a string (e.g. Return values: [code]"Escape"[/code], [code]"Shift+Escape"[/code]).
-				See also [member InputEventKey.keycode] and [method InputEventKey.get_keycode_with_modifiers].
-			</description>
-		</method>
 		<method name="get_screen_count" qualifiers="const">
 			<return type="int">
 			</return>
@@ -588,20 +588,20 @@
 				To check whether the Godot binary used to run the project is an export template (debug or release), use [code]OS.has_feature("standalone")[/code] instead.
 			</description>
 		</method>
-		<method name="is_ok_left_and_cancel_right" qualifiers="const">
+		<method name="is_keycode_unicode" qualifiers="const">
 			<return type="bool">
 			</return>
+			<argument index="0" name="code" type="int">
+			</argument>
 			<description>
-				Returns [code]true[/code] if the [b]OK[/b] button should appear on the left and [b]Cancel[/b] on the right.
+				Returns [code]true[/code] if the input keycode corresponds to a Unicode character.
 			</description>
 		</method>
-		<method name="is_keycode_unicode" qualifiers="const">
+		<method name="is_ok_left_and_cancel_right" qualifiers="const">
 			<return type="bool">
 			</return>
-			<argument index="0" name="code" type="int">
-			</argument>
 			<description>
-				Returns [code]true[/code] if the input keycode corresponds to a Unicode character.
+				Returns [code]true[/code] if the [b]OK[/b] button should appear on the left and [b]Cancel[/b] on the right.
 			</description>
 		</method>
 		<method name="is_stdout_verbose" qualifiers="const">

+ 1 - 1
doc/classes/Rect2.xml

@@ -143,7 +143,7 @@
 			</return>
 			<argument index="0" name="b" type="Rect2">
 			</argument>
-			<argument index="1" name="include_borders" type="bool" default="false">
+			<argument index="1" name="include_borders" type="bool" default="False">
 			</argument>
 			<description>
 				Returns [code]true[/code] if the [Rect2] overlaps with [code]b[/code] (i.e. they have at least one point in common).

+ 6 - 6
doc/classes/Semaphore.xml

@@ -17,18 +17,18 @@
 				Lowers the [Semaphore], allowing one more thread in.
 			</description>
 		</method>
-		<method name="wait">
-			<return type="void">
+		<method name="try_wait">
+			<return type="int" enum="Error">
 			</return>
 			<description>
-				Waits for the [Semaphore], if its value is zero, blocks until non-zero.
+				Like [method wait], but won't block, so if the value is zero, fails immediately and returns [constant ERR_BUSY]. If non-zero, it returns [constant OK] to report success.
 			</description>
 		</method>
-		<method name="try_wait">
-			<return type="int" enum="Error">
+		<method name="wait">
+			<return type="void">
 			</return>
 			<description>
-				Like [method wait], but won't block, so if the value is zero, fails immediately and returns [constant ERR_BUSY]. If non-zero, it returns [constant OK] to report success.
+				Waits for the [Semaphore], if its value is zero, blocks until non-zero.
 			</description>
 		</method>
 	</methods>