Browse Source

Merge pull request #5192 from J08nY/issue-5190

Dictionary: rename param in .has() .has_all() .erase()
Rémi Verschelde 9 years ago
parent
commit
78b745bb0a
2 changed files with 46 additions and 39 deletions
  1. 3 3
      core/variant_call.cpp
  2. 43 36
      doc/base/classes.xml

+ 3 - 3
core/variant_call.cpp

@@ -1437,9 +1437,9 @@ _VariantCall::addfunc(Variant::m_vtype,Variant::m_ret,_SCS(#m_method),VCALL(m_cl
 	ADDFUNC0(DICTIONARY,INT,Dictionary,size,varray());
 	ADDFUNC0(DICTIONARY,INT,Dictionary,size,varray());
 	ADDFUNC0(DICTIONARY,BOOL,Dictionary,empty,varray());
 	ADDFUNC0(DICTIONARY,BOOL,Dictionary,empty,varray());
 	ADDFUNC0(DICTIONARY,NIL,Dictionary,clear,varray());
 	ADDFUNC0(DICTIONARY,NIL,Dictionary,clear,varray());
-	ADDFUNC1(DICTIONARY,BOOL,Dictionary,has,NIL,"value",varray());
-	ADDFUNC1(DICTIONARY,BOOL,Dictionary,has_all,ARRAY,"values",varray());
-	ADDFUNC1(DICTIONARY,NIL,Dictionary,erase,NIL,"value",varray());
+	ADDFUNC1(DICTIONARY,BOOL,Dictionary,has,NIL,"key",varray());
+	ADDFUNC1(DICTIONARY,BOOL,Dictionary,has_all,ARRAY,"keys",varray());
+	ADDFUNC1(DICTIONARY,NIL,Dictionary,erase,NIL,"key",varray());
 	ADDFUNC0(DICTIONARY,INT,Dictionary,hash,varray());
 	ADDFUNC0(DICTIONARY,INT,Dictionary,hash,varray());
 	ADDFUNC0(DICTIONARY,ARRAY,Dictionary,keys,varray());
 	ADDFUNC0(DICTIONARY,ARRAY,Dictionary,keys,varray());
 	ADDFUNC0(DICTIONARY,ARRAY,Dictionary,values,varray());
 	ADDFUNC0(DICTIONARY,ARRAY,Dictionary,values,varray());

+ 43 - 36
doc/base/classes.xml

@@ -1829,6 +1829,8 @@
 		</constant>
 		</constant>
 		<constant name="PROPERTY_USAGE_RESTART_IF_CHANGED" value="4096">
 		<constant name="PROPERTY_USAGE_RESTART_IF_CHANGED" value="4096">
 		</constant>
 		</constant>
+		<constant name="PROPERTY_USAGE_SCRIPT_VARIABLE" value="8192">
+		</constant>
 		<constant name="PROPERTY_USAGE_DEFAULT" value="7">
 		<constant name="PROPERTY_USAGE_DEFAULT" value="7">
 			Default usage (storage and editor).
 			Default usage (storage and editor).
 		</constant>
 		</constant>
@@ -2392,7 +2394,35 @@
 			</description>
 			</description>
 		</method>
 		</method>
 		<method name="get_sprite_frames" qualifiers="const">
 		<method name="get_sprite_frames" qualifiers="const">
-			<return type="Texture">
+			<return type="SpriteFrames">
+			</return>
+			<description>
+			</description>
+		</method>
+		<method name="set_animation">
+			<argument index="0" name="animation" type="String">
+			</argument>
+			<description>
+			</description>
+		</method>
+		<method name="get_animation" qualifiers="const">
+			<return type="String">
+			</return>
+			<description>
+			</description>
+		</method>
+		<method name="play">
+			<argument index="0" name="anim" type="String" default="&quot;&quot;">
+			</argument>
+			<description>
+			</description>
+		</method>
+		<method name="stop">
+			<description>
+			</description>
+		</method>
+		<method name="is_playing" qualifiers="const">
+			<return type="bool">
 			</return>
 			</return>
 			<description>
 			<description>
 			</description>
 			</description>
@@ -4474,9 +4504,11 @@
 			</description>
 			</description>
 		</method>
 		</method>
 		<method name="rfind">
 		<method name="rfind">
+			<return type="int">
+			</return>
 			<argument index="0" name="what" type="var">
 			<argument index="0" name="what" type="var">
 			</argument>
 			</argument>
-			<argument index="1" name="from" type="int">
+			<argument index="1" name="from" type="int" default="-1">
 			</argument>
 			</argument>
 			<description>
 			<description>
 			Searches the array in reverse order. Optionally, a start search index can be passed. If negative, the start index is considered relative to the end of the array.
 			Searches the array in reverse order. Optionally, a start search index can be passed. If negative, the start index is considered relative to the end of the array.
@@ -10408,7 +10440,7 @@ This approximation makes straight segments between each point, then subdivides t
 			</description>
 			</description>
 		</method>
 		</method>
 		<method name="erase">
 		<method name="erase">
-			<argument index="0" name="value" type="var">
+			<argument index="0" name="key" type="var">
 			</argument>
 			</argument>
 			<description>
 			<description>
 			Erase a dictionary key/value pair by key.
 			Erase a dictionary key/value pair by key.
@@ -10417,7 +10449,7 @@ This approximation makes straight segments between each point, then subdivides t
 		<method name="has">
 		<method name="has">
 			<return type="bool">
 			<return type="bool">
 			</return>
 			</return>
-			<argument index="0" name="value" type="var">
+			<argument index="0" name="key" type="var">
 			</argument>
 			</argument>
 			<description>
 			<description>
 			Return true if the dictionary has a given key.
 			Return true if the dictionary has a given key.
@@ -10426,7 +10458,7 @@ This approximation makes straight segments between each point, then subdivides t
 		<method name="has_all">
 		<method name="has_all">
 			<return type="bool">
 			<return type="bool">
 			</return>
 			</return>
-			<argument index="0" name="values" type="Array">
+			<argument index="0" name="keys" type="Array">
 			</argument>
 			</argument>
 			<description>
 			<description>
 			Return true if the dictionary has all of the keys in the given array.
 			Return true if the dictionary has all of the keys in the given array.
@@ -17352,25 +17384,13 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
 			<description>
 			<description>
 			</description>
 			</description>
 		</method>
 		</method>
-		<method name="set_min_icon_size">
+		<method name="set_fixed_icon_size">
 			<argument index="0" name="size" type="Vector2">
 			<argument index="0" name="size" type="Vector2">
 			</argument>
 			</argument>
 			<description>
 			<description>
 			</description>
 			</description>
 		</method>
 		</method>
-		<method name="get_min_icon_size" qualifiers="const">
-			<return type="Vector2">
-			</return>
-			<description>
-			</description>
-		</method>
-		<method name="set_max_icon_size">
-			<argument index="0" name="size" type="Vector2">
-			</argument>
-			<description>
-			</description>
-		</method>
-		<method name="get_max_icon_size" qualifiers="const">
+		<method name="get_fixed_icon_size" qualifiers="const">
 			<return type="Vector2">
 			<return type="Vector2">
 			</return>
 			</return>
 			<description>
 			<description>
@@ -25390,8 +25410,6 @@ This method controls whether the position between two cached points is interpola
 			</description>
 			</description>
 		</method>
 		</method>
 		<method name="shape_get_data" qualifiers="const">
 		<method name="shape_get_data" qualifiers="const">
-			<return type="Variant">
-			</return>
 			<argument index="0" name="shape" type="RID">
 			<argument index="0" name="shape" type="RID">
 			</argument>
 			</argument>
 			<description>
 			<description>
@@ -25616,8 +25634,6 @@ This method controls whether the position between two cached points is interpola
 			</description>
 			</description>
 		</method>
 		</method>
 		<method name="area_get_param" qualifiers="const">
 		<method name="area_get_param" qualifiers="const">
-			<return type="Variant">
-			</return>
 			<argument index="0" name="area" type="RID">
 			<argument index="0" name="area" type="RID">
 			</argument>
 			</argument>
 			<argument index="1" name="param" type="int">
 			<argument index="1" name="param" type="int">
@@ -25792,8 +25808,6 @@ This method controls whether the position between two cached points is interpola
 			</description>
 			</description>
 		</method>
 		</method>
 		<method name="body_get_shape_metadata" qualifiers="const">
 		<method name="body_get_shape_metadata" qualifiers="const">
-			<return type="Variant">
-			</return>
 			<argument index="0" name="body" type="RID">
 			<argument index="0" name="body" type="RID">
 			</argument>
 			</argument>
 			<argument index="1" name="shape_idx" type="int">
 			<argument index="1" name="shape_idx" type="int">
@@ -25947,8 +25961,6 @@ This method controls whether the position between two cached points is interpola
 			</description>
 			</description>
 		</method>
 		</method>
 		<method name="body_get_state" qualifiers="const">
 		<method name="body_get_state" qualifiers="const">
-			<return type="Variant">
-			</return>
 			<argument index="0" name="body" type="RID">
 			<argument index="0" name="body" type="RID">
 			</argument>
 			</argument>
 			<argument index="1" name="state" type="int">
 			<argument index="1" name="state" type="int">
@@ -26373,15 +26385,6 @@ This method controls whether the position between two cached points is interpola
 		<constant name="JOINT_DAMPED_SPRING" value="2">
 		<constant name="JOINT_DAMPED_SPRING" value="2">
 			Constant to create damped spring joints.
 			Constant to create damped spring joints.
 		</constant>
 		</constant>
-		<constant name="JOINT_PARAM_BIAS" value="0">
-			Constant to set/get the solver bias for a joint.
-		</constant>
-		<constant name="JOINT_PARAM_MAX_BIAS" value="1">
-			Constant to set/get the maximum speed at which a joint can correct its bodies.
-		</constant>
-		<constant name="JOINT_PARAM_MAX_FORCE" value="2">
-			Constant to set the maximum force a joint can exert on its bodies.
-		</constant>
 		<constant name="DAMPED_STRING_REST_LENGTH" value="0">
 		<constant name="DAMPED_STRING_REST_LENGTH" value="0">
 			Set the resting length of the spring joint. The joint will always try to go to back this length when pulled apart.
 			Set the resting length of the spring joint. The joint will always try to go to back this length when pulled apart.
 		</constant>
 		</constant>
@@ -39177,6 +39180,10 @@ This method controls whether the position between two cached points is interpola
 		</constant>
 		</constant>
 		<constant name="STRETCH_KEEP_CENTERED" value="4">
 		<constant name="STRETCH_KEEP_CENTERED" value="4">
 		</constant>
 		</constant>
+		<constant name="STRETCH_KEEP_ASPECT" value="5">
+		</constant>
+		<constant name="STRETCH_KEEP_ASPECT_CENTERED" value="6">
+		</constant>
 	</constants>
 	</constants>
 </class>
 </class>
 <class name="TextureProgress" inherits="Range" category="Core">
 <class name="TextureProgress" inherits="Range" category="Core">