Browse Source

doc: Sync classref and escape comparators

[ci skip]
Rémi Verschelde 8 years ago
parent
commit
574a5714dc

+ 4 - 4
doc/classes/@GDScript.xml

@@ -96,9 +96,9 @@
 				[codeblock]
 				[codeblock]
 				# Speed should always be between 0 and 20
 				# Speed should always be between 0 and 20
 				speed = -10
 				speed = -10
-				assert(speed < 20) # Is true and program continues
-				assert(speed >= 0) # Is false and program stops
-				assert(speed >= 0 &amp;&amp; speed < 20) # Or combined
+				assert(speed &lt; 20) # Is true and program continues
+				assert(speed &gt;= 0) # Is false and program stops
+				assert(speed &gt;= 0 &amp;&amp; speed &lt; 20) # Or combined
 				[/codeblock]
 				[/codeblock]
 			</description>
 			</description>
 		</method>
 		</method>
@@ -360,7 +360,7 @@
 				Returns the floating-point remainder of x/y that wraps equally in positive and negative.
 				Returns the floating-point remainder of x/y that wraps equally in positive and negative.
 				[codeblock]
 				[codeblock]
 				var i = -10;
 				var i = -10;
-				while i < 0:
+				while i &lt; 0:
 				    prints(i, fposmod(i, 10))
 				    prints(i, fposmod(i, 10))
 				    i += 1
 				    i += 1
 				[/codeblock]
 				[/codeblock]

+ 2 - 0
doc/classes/@Global Scope.xml

@@ -38,6 +38,8 @@
 		<member name="InputMap" type="InputMap" setter="" getter="">
 		<member name="InputMap" type="InputMap" setter="" getter="">
 			[InputMap] singleton
 			[InputMap] singleton
 		</member>
 		</member>
+		<member name="JSON" type="JSON" setter="" getter="">
+		</member>
 		<member name="Marshalls" type="Reference" setter="" getter="">
 		<member name="Marshalls" type="Reference" setter="" getter="">
 			[Marshalls] singleton
 			[Marshalls] singleton
 		</member>
 		</member>

+ 31 - 0
doc/classes/JSON.xml

@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="JSON" inherits="Object" category="Core" version="3.0.alpha.custom_build">
+	<brief_description>
+	</brief_description>
+	<description>
+	</description>
+	<tutorials>
+	</tutorials>
+	<demos>
+	</demos>
+	<methods>
+		<method name="parse">
+			<return type="JSONParseResult">
+			</return>
+			<argument index="0" name="json" type="String">
+			</argument>
+			<description>
+			</description>
+		</method>
+		<method name="print">
+			<return type="String">
+			</return>
+			<argument index="0" name="value" type="Variant">
+			</argument>
+			<description>
+			</description>
+		</method>
+	</methods>
+	<constants>
+	</constants>
+</class>

+ 81 - 0
doc/classes/JSONParseResult.xml

@@ -0,0 +1,81 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="JSONParseResult" inherits="Reference" category="Core" version="3.0.alpha.custom_build">
+	<brief_description>
+	</brief_description>
+	<description>
+	</description>
+	<tutorials>
+	</tutorials>
+	<demos>
+	</demos>
+	<methods>
+		<method name="get_error" qualifiers="const">
+			<return type="int" enum="Error">
+			</return>
+			<description>
+			</description>
+		</method>
+		<method name="get_error_line" qualifiers="const">
+			<return type="int">
+			</return>
+			<description>
+			</description>
+		</method>
+		<method name="get_error_string" qualifiers="const">
+			<return type="String">
+			</return>
+			<description>
+			</description>
+		</method>
+		<method name="get_result" qualifiers="const">
+			<return type="Variant">
+			</return>
+			<description>
+			</description>
+		</method>
+		<method name="set_error">
+			<return type="void">
+			</return>
+			<argument index="0" name="error" type="int" enum="Error">
+			</argument>
+			<description>
+			</description>
+		</method>
+		<method name="set_error_line">
+			<return type="void">
+			</return>
+			<argument index="0" name="error_line" type="int">
+			</argument>
+			<description>
+			</description>
+		</method>
+		<method name="set_error_string">
+			<return type="void">
+			</return>
+			<argument index="0" name="error_string" type="String">
+			</argument>
+			<description>
+			</description>
+		</method>
+		<method name="set_result">
+			<return type="void">
+			</return>
+			<argument index="0" name="result" type="Variant">
+			</argument>
+			<description>
+			</description>
+		</method>
+	</methods>
+	<members>
+		<member name="error" type="int" setter="set_error" getter="get_error" enum="Error">
+		</member>
+		<member name="error_line" type="int" setter="set_error_line" getter="get_error_line">
+		</member>
+		<member name="error_string" type="String" setter="set_error_string" getter="get_error_string">
+		</member>
+		<member name="result" type="Variant" setter="set_result" getter="get_result">
+		</member>
+	</members>
+	<constants>
+	</constants>
+</class>

+ 1 - 1
doc/classes/Light2D.xml

@@ -388,7 +388,7 @@
 			Shadow filter type. May be one of [code][None, PCF5, PCF9, PCF13][/code]. Default value: [code]None[/code].
 			Shadow filter type. May be one of [code][None, PCF5, PCF9, PCF13][/code]. Default value: [code]None[/code].
 		</member>
 		</member>
 		<member name="shadow_filter_smooth" type="float" setter="set_shadow_smooth" getter="get_shadow_smooth">
 		<member name="shadow_filter_smooth" type="float" setter="set_shadow_smooth" getter="get_shadow_smooth">
-			Smoothing value for shadows. 
+			Smoothing value for shadows.
 		</member>
 		</member>
 		<member name="shadow_gradient_length" type="float" setter="set_shadow_gradient_length" getter="get_shadow_gradient_length">
 		<member name="shadow_gradient_length" type="float" setter="set_shadow_gradient_length" getter="get_shadow_gradient_length">
 			Smooth shadow gradient length.
 			Smooth shadow gradient length.

+ 8 - 8
doc/classes/OS.xml

@@ -286,7 +286,7 @@
 			</description>
 			</description>
 		</method>
 		</method>
 		<method name="get_screen_orientation" qualifiers="const">
 		<method name="get_screen_orientation" qualifiers="const">
-			<return type="int" enum="_OS.ScreenOrientation">
+			<return type="int" enum="OS.ScreenOrientation">
 			</return>
 			</return>
 			<description>
 			<description>
 				Returns the current screen orientation, the return value will be one of the SCREEN_ORIENTATION constants in this class.
 				Returns the current screen orientation, the return value will be one of the SCREEN_ORIENTATION constants in this class.
@@ -331,7 +331,7 @@
 		<method name="get_system_dir" qualifiers="const">
 		<method name="get_system_dir" qualifiers="const">
 			<return type="String">
 			<return type="String">
 			</return>
 			</return>
-			<argument index="0" name="dir" type="int" enum="_OS.SystemDir">
+			<argument index="0" name="dir" type="int" enum="OS.SystemDir">
 			</argument>
 			</argument>
 			<description>
 			<description>
 			</description>
 			</description>
@@ -660,7 +660,7 @@
 		<method name="set_screen_orientation">
 		<method name="set_screen_orientation">
 			<return type="void">
 			<return type="void">
 			</return>
 			</return>
-			<argument index="0" name="orientation" type="int" enum="_OS.ScreenOrientation">
+			<argument index="0" name="orientation" type="int" enum="OS.ScreenOrientation">
 			</argument>
 			</argument>
 			<description>
 			<description>
 				Sets the current screen orientation, the argument value must be one of the SCREEN_ORIENTATION constants in this class.
 				Sets the current screen orientation, the argument value must be one of the SCREEN_ORIENTATION constants in this class.
@@ -840,15 +840,15 @@
 		</constant>
 		</constant>
 		<constant name="SYSTEM_DIR_RINGTONES" value="7">
 		<constant name="SYSTEM_DIR_RINGTONES" value="7">
 		</constant>
 		</constant>
-		<constant name="OS::POWERSTATE_UNKNOWN" value="0">
+		<constant name="POWERSTATE_UNKNOWN" value="0">
 		</constant>
 		</constant>
-		<constant name="OS::POWERSTATE_ON_BATTERY" value="1">
+		<constant name="POWERSTATE_ON_BATTERY" value="1">
 		</constant>
 		</constant>
-		<constant name="OS::POWERSTATE_NO_BATTERY" value="2">
+		<constant name="POWERSTATE_NO_BATTERY" value="2">
 		</constant>
 		</constant>
-		<constant name="OS::POWERSTATE_CHARGING" value="3">
+		<constant name="POWERSTATE_CHARGING" value="3">
 		</constant>
 		</constant>
-		<constant name="OS::POWERSTATE_CHARGED" value="4">
+		<constant name="POWERSTATE_CHARGED" value="4">
 		</constant>
 		</constant>
 	</constants>
 	</constants>
 </class>
 </class>

+ 26 - 0
doc/classes/UndoRedo.xml

@@ -108,6 +108,12 @@
 				Get the name of the current action.
 				Get the name of the current action.
 			</description>
 			</description>
 		</method>
 		</method>
+		<method name="get_max_steps" qualifiers="const">
+			<return type="int">
+			</return>
+			<description>
+			</description>
+		</method>
 		<method name="get_version" qualifiers="const">
 		<method name="get_version" qualifiers="const">
 			<return type="int">
 			<return type="int">
 			</return>
 			</return>
@@ -116,6 +122,26 @@
 				This is useful mostly to check if something changed from a saved version.
 				This is useful mostly to check if something changed from a saved version.
 			</description>
 			</description>
 		</method>
 		</method>
+		<method name="redo">
+			<return type="void">
+			</return>
+			<description>
+			</description>
+		</method>
+		<method name="set_max_steps">
+			<return type="void">
+			</return>
+			<argument index="0" name="max_steps" type="int">
+			</argument>
+			<description>
+			</description>
+		</method>
+		<method name="undo">
+			<return type="void">
+			</return>
+			<description>
+			</description>
+		</method>
 	</methods>
 	</methods>
 	<constants>
 	<constants>
 		<constant name="MERGE_DISABLE" value="0">
 		<constant name="MERGE_DISABLE" value="0">