doc: Sync classref and escape comparators

[ci skip]
This commit is contained in:
Rémi Verschelde 2017-09-17 18:57:13 +02:00
parent 07d18a0076
commit 574a5714dc
7 changed files with 153 additions and 13 deletions

View file

@ -96,9 +96,9 @@
[codeblock]
# Speed should always be between 0 and 20
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]
</description>
</method>
@ -360,7 +360,7 @@
Returns the floating-point remainder of x/y that wraps equally in positive and negative.
[codeblock]
var i = -10;
while i < 0:
while i &lt; 0:
prints(i, fposmod(i, 10))
i += 1
[/codeblock]

View file

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

31
doc/classes/JSON.xml Normal file
View file

@ -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>

View file

@ -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>

View file

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

View file

@ -286,7 +286,7 @@
</description>
</method>
<method name="get_screen_orientation" qualifiers="const">
<return type="int" enum="_OS.ScreenOrientation">
<return type="int" enum="OS.ScreenOrientation">
</return>
<description>
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">
<return type="String">
</return>
<argument index="0" name="dir" type="int" enum="_OS.SystemDir">
<argument index="0" name="dir" type="int" enum="OS.SystemDir">
</argument>
<description>
</description>
@ -660,7 +660,7 @@
<method name="set_screen_orientation">
<return type="void">
</return>
<argument index="0" name="orientation" type="int" enum="_OS.ScreenOrientation">
<argument index="0" name="orientation" type="int" enum="OS.ScreenOrientation">
</argument>
<description>
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 name="SYSTEM_DIR_RINGTONES" value="7">
</constant>
<constant name="OS::POWERSTATE_UNKNOWN" value="0">
<constant name="POWERSTATE_UNKNOWN" value="0">
</constant>
<constant name="OS::POWERSTATE_ON_BATTERY" value="1">
<constant name="POWERSTATE_ON_BATTERY" value="1">
</constant>
<constant name="OS::POWERSTATE_NO_BATTERY" value="2">
<constant name="POWERSTATE_NO_BATTERY" value="2">
</constant>
<constant name="OS::POWERSTATE_CHARGING" value="3">
<constant name="POWERSTATE_CHARGING" value="3">
</constant>
<constant name="OS::POWERSTATE_CHARGED" value="4">
<constant name="POWERSTATE_CHARGED" value="4">
</constant>
</constants>
</class>

View file

@ -108,6 +108,12 @@
Get the name of the current action.
</description>
</method>
<method name="get_max_steps" qualifiers="const">
<return type="int">
</return>
<description>
</description>
</method>
<method name="get_version" qualifiers="const">
<return type="int">
</return>
@ -116,6 +122,26 @@
This is useful mostly to check if something changed from a saved version.
</description>
</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>
<constants>
<constant name="MERGE_DISABLE" value="0">