diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2017-12-10 15:10:54 +0100 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2017-12-10 15:34:08 +0100 |
commit | 2b41afb30e51629c439344439419b544ef12bf17 (patch) | |
tree | b550031a281a0bb1b05d90c38a879c9299840ca2 | |
parent | 6b6f94fb0c4a23b27295d84c43e219ed721f4d06 (diff) |
Fix wrong return value in some virtual method bindings
-rw-r--r-- | core/math/a_star.cpp | 4 | ||||
-rw-r--r-- | doc/classes/AStar.xml | 4 | ||||
-rw-r--r-- | doc/classes/CubeMap.xml | 2 | ||||
-rw-r--r-- | doc/classes/EditorResourceConversionPlugin.xml | 2 | ||||
-rw-r--r-- | doc/classes/PopupMenu.xml | 32 | ||||
-rw-r--r-- | doc/classes/TileSet.xml | 4 | ||||
-rw-r--r-- | editor/property_editor.cpp | 2 | ||||
-rw-r--r-- | scene/resources/tile_set.cpp | 4 |
8 files changed, 43 insertions, 11 deletions
diff --git a/core/math/a_star.cpp b/core/math/a_star.cpp index 7e26761abf..4498efeb41 100644 --- a/core/math/a_star.cpp +++ b/core/math/a_star.cpp @@ -473,8 +473,8 @@ void AStar::_bind_methods() { ClassDB::bind_method(D_METHOD("get_point_path", "from_id", "to_id"), &AStar::get_point_path); ClassDB::bind_method(D_METHOD("get_id_path", "from_id", "to_id"), &AStar::get_id_path); - BIND_VMETHOD(MethodInfo("_estimate_cost", PropertyInfo(Variant::INT, "from_id"), PropertyInfo(Variant::INT, "to_id"))); - BIND_VMETHOD(MethodInfo("_compute_cost", PropertyInfo(Variant::INT, "from_id"), PropertyInfo(Variant::INT, "to_id"))); + BIND_VMETHOD(MethodInfo(Variant::REAL, "_estimate_cost", PropertyInfo(Variant::INT, "from_id"), PropertyInfo(Variant::INT, "to_id"))); + BIND_VMETHOD(MethodInfo(Variant::REAL, "_compute_cost", PropertyInfo(Variant::INT, "from_id"), PropertyInfo(Variant::INT, "to_id"))); } AStar::AStar() { diff --git a/doc/classes/AStar.xml b/doc/classes/AStar.xml index eefdf4d7a7..e0e3261edf 100644 --- a/doc/classes/AStar.xml +++ b/doc/classes/AStar.xml @@ -13,7 +13,7 @@ </demos> <methods> <method name="_compute_cost" qualifiers="virtual"> - <return type="void"> + <return type="float"> </return> <argument index="0" name="from_id" type="int"> </argument> @@ -24,7 +24,7 @@ </description> </method> <method name="_estimate_cost" qualifiers="virtual"> - <return type="void"> + <return type="float"> </return> <argument index="0" name="from_id" type="int"> </argument> diff --git a/doc/classes/CubeMap.xml b/doc/classes/CubeMap.xml index 7444fb0258..30022efd38 100644 --- a/doc/classes/CubeMap.xml +++ b/doc/classes/CubeMap.xml @@ -66,7 +66,7 @@ <member name="lossy_storage_quality" type="float" setter="set_lossy_storage_quality" getter="get_lossy_storage_quality"> The lossy storage quality of the [code]CubeMap[/code] if the storage mode is set to STORAGE_COMPRESS_LOSSY. </member> - <member name="storage_mode" type="CubeMap.Storage" setter="set_storage" getter="get_storage" enum="CubeMap.Storage"> + <member name="storage_mode" type="int" setter="set_storage" getter="get_storage" enum="CubeMap.Storage"> The [code]CubeMap[/code]'s storage mode. See [code]STORAGE_*[/code] constants. </member> </members> diff --git a/doc/classes/EditorResourceConversionPlugin.xml b/doc/classes/EditorResourceConversionPlugin.xml index b2bbe69061..8d6aa3a605 100644 --- a/doc/classes/EditorResourceConversionPlugin.xml +++ b/doc/classes/EditorResourceConversionPlugin.xml @@ -18,7 +18,7 @@ </description> </method> <method name="_converts_to" qualifiers="virtual"> - <return type="bool"> + <return type="String"> </return> <description> </description> diff --git a/doc/classes/PopupMenu.xml b/doc/classes/PopupMenu.xml index 7071d64f2e..42ed57e4af 100644 --- a/doc/classes/PopupMenu.xml +++ b/doc/classes/PopupMenu.xml @@ -233,6 +233,12 @@ <description> </description> </method> + <method name="is_hide_on_state_item_selection" qualifiers="const"> + <return type="bool"> + </return> + <description> + </description> + </method> <method name="is_item_checkable" qualifiers="const"> <return type="bool"> </return> @@ -278,6 +284,14 @@ Removes the item at index "idx" from the menu. Note that the indexes of items after the removed item are going to be shifted by one. </description> </method> + <method name="set_hide_on_state_item_selection"> + <return type="void"> + </return> + <argument index="0" name="enable" type="bool"> + </argument> + <description> + </description> + </method> <method name="set_item_accelerator"> <return type="void"> </return> @@ -377,6 +391,16 @@ <description> </description> </method> + <method name="set_item_statable"> + <return type="void"> + </return> + <argument index="0" name="idx" type="int"> + </argument> + <argument index="1" name="state" type="int"> + </argument> + <description> + </description> + </method> <method name="set_item_submenu"> <return type="void"> </return> @@ -417,6 +441,14 @@ <description> </description> </method> + <method name="toggle_item_statable"> + <return type="void"> + </return> + <argument index="0" name="idx" type="int"> + </argument> + <description> + </description> + </method> </methods> <members> <member name="hide_on_checkable_item_selection" type="bool" setter="set_hide_on_checkable_item_selection" getter="is_hide_on_checkable_item_selection"> diff --git a/doc/classes/TileSet.xml b/doc/classes/TileSet.xml index 6a147a9646..3dbf172c5a 100644 --- a/doc/classes/TileSet.xml +++ b/doc/classes/TileSet.xml @@ -13,7 +13,7 @@ </demos> <methods> <method name="_forward_subtile_selection" qualifiers="virtual"> - <return type="void"> + <return type="Vector2"> </return> <argument index="0" name="autotile_id" type="int"> </argument> @@ -27,7 +27,7 @@ </description> </method> <method name="_is_tile_bound" qualifiers="virtual"> - <return type="void"> + <return type="bool"> </return> <argument index="0" name="drawn_id" type="int"> </argument> diff --git a/editor/property_editor.cpp b/editor/property_editor.cpp index b3743dbdf8..b187a9ae9d 100644 --- a/editor/property_editor.cpp +++ b/editor/property_editor.cpp @@ -70,7 +70,7 @@ void EditorResourceConversionPlugin::_bind_methods() { mi.name = "_handles"; mi.return_val = PropertyInfo(Variant::BOOL, ""); - BIND_VMETHOD(MethodInfo(Variant::BOOL, "_converts_to")); + BIND_VMETHOD(MethodInfo(Variant::STRING, "_converts_to")); } String EditorResourceConversionPlugin::converts_to() const { diff --git a/scene/resources/tile_set.cpp b/scene/resources/tile_set.cpp index 1a46353fe3..bd6b917d4e 100644 --- a/scene/resources/tile_set.cpp +++ b/scene/resources/tile_set.cpp @@ -932,8 +932,8 @@ void TileSet::_bind_methods() { ClassDB::bind_method(D_METHOD("find_tile_by_name", "name"), &TileSet::find_tile_by_name); ClassDB::bind_method(D_METHOD("get_tiles_ids"), &TileSet::_get_tiles_ids); - BIND_VMETHOD(MethodInfo("_is_tile_bound", PropertyInfo(Variant::INT, "drawn_id"), PropertyInfo(Variant::INT, "neighbor_id"))); - BIND_VMETHOD(MethodInfo("_forward_subtile_selection", PropertyInfo(Variant::INT, "autotile_id"), PropertyInfo(Variant::INT, "bitmask"), PropertyInfo(Variant::OBJECT, "tilemap", PROPERTY_HINT_NONE, "TileMap"), PropertyInfo(Variant::VECTOR2, "tile_location"))); + BIND_VMETHOD(MethodInfo(Variant::BOOL, "_is_tile_bound", PropertyInfo(Variant::INT, "drawn_id"), PropertyInfo(Variant::INT, "neighbor_id"))); + BIND_VMETHOD(MethodInfo(Variant::VECTOR2, "_forward_subtile_selection", PropertyInfo(Variant::INT, "autotile_id"), PropertyInfo(Variant::INT, "bitmask"), PropertyInfo(Variant::OBJECT, "tilemap", PROPERTY_HINT_NONE, "TileMap"), PropertyInfo(Variant::VECTOR2, "tile_location"))); BIND_ENUM_CONSTANT(BITMASK_2X2); BIND_ENUM_CONSTANT(BITMASK_3X3); |