From 72aa87758a6c7795dc488cda45ccbd37f71de9a7 Mon Sep 17 00:00:00 2001 From: Poommetee Ketson Date: Sat, 24 Mar 2018 00:57:58 +0700 Subject: [PATCH] Update classref and docs, fix missing parameters' name --- core/bind/core_bind.cpp | 4 ++-- doc/classes/ARVRServer.xml | 18 +++--------------- doc/classes/Camera.xml | 2 +- doc/classes/EditorPlugin.xml | 2 ++ doc/classes/ItemList.xml | 7 +++++-- doc/classes/OS.xml | 4 ++-- doc/classes/OptionButton.xml | 1 + doc/classes/PopupMenu.xml | 1 + doc/classes/Vector2.xml | 2 +- scene/gui/item_list.cpp | 2 +- servers/arvr_server.cpp | 2 ++ 11 files changed, 21 insertions(+), 24 deletions(-) diff --git a/core/bind/core_bind.cpp b/core/bind/core_bind.cpp index 20adf7ff024..a977fd3da49 100644 --- a/core/bind/core_bind.cpp +++ b/core/bind/core_bind.cpp @@ -1032,9 +1032,9 @@ void _OS::_bind_methods() { //ClassDB::bind_method(D_METHOD("get_fullscreen_mode_list","screen"),&_OS::get_fullscreen_mode_list,DEFVAL(0)); ClassDB::bind_method(D_METHOD("get_video_driver_count"), &_OS::get_video_driver_count); - ClassDB::bind_method(D_METHOD("get_video_driver_name"), &_OS::get_video_driver_name); + ClassDB::bind_method(D_METHOD("get_video_driver_name", "driver"), &_OS::get_video_driver_name); ClassDB::bind_method(D_METHOD("get_audio_driver_count"), &_OS::get_audio_driver_count); - ClassDB::bind_method(D_METHOD("get_audio_driver_name"), &_OS::get_audio_driver_name); + ClassDB::bind_method(D_METHOD("get_audio_driver_name", "driver"), &_OS::get_audio_driver_name); ClassDB::bind_method(D_METHOD("get_screen_count"), &_OS::get_screen_count); ClassDB::bind_method(D_METHOD("get_current_screen"), &_OS::get_current_screen); diff --git a/doc/classes/ARVRServer.xml b/doc/classes/ARVRServer.xml index 3164d0c2c36..a7d3e466843 100644 --- a/doc/classes/ARVRServer.xml +++ b/doc/classes/ARVRServer.xml @@ -40,6 +40,7 @@ + Returns the primary interface's transformation. @@ -83,12 +84,6 @@ - - - - - - @@ -112,17 +107,10 @@ Get the number of trackers currently registered. - - - - - - - Changes the primary interface to the specified interface. Again mostly exposed for GDNative interfaces. - - + + Allows you to adjust the scale to your game's units. Most AR/VR platforms assume a scale of 1 game world unit = 1 meter in the real world. diff --git a/doc/classes/Camera.xml b/doc/classes/Camera.xml index 1260b369f5b..7f7f152ae9b 100644 --- a/doc/classes/Camera.xml +++ b/doc/classes/Camera.xml @@ -17,7 +17,7 @@ - If this is the current Camera, remove it from being current. If it is inside the node tree and [code]enabled_next[/code] is [code]true[/true], request to make the next Camera current, if any. + If this is the current Camera, remove it from being current. If [code]enable_next[/code] is true, request to make the next Camera current, if any. diff --git a/doc/classes/EditorPlugin.xml b/doc/classes/EditorPlugin.xml index a98cbf03168..846d6f18ff6 100644 --- a/doc/classes/EditorPlugin.xml +++ b/doc/classes/EditorPlugin.xml @@ -114,6 +114,7 @@ + Adds a custom menu to 'Project > Tools' as [code]name[/code] that calls [code]callback[/code] on an instance of [code]handler[/code] with a parameter [code]ud[/code] when user activates it. @@ -367,6 +368,7 @@ + Removes a menu [code]name[/code] from 'Project > Tools'. diff --git a/doc/classes/ItemList.xml b/doc/classes/ItemList.xml index 4539c31441f..bd1d6be4f5a 100644 --- a/doc/classes/ItemList.xml +++ b/doc/classes/ItemList.xml @@ -148,6 +148,7 @@ + Returns [code]true[/code] if one or more items are selected. @@ -189,11 +190,12 @@ - + - + + Moves item at index [code]from_idx[/code] to [code]to_idx[/code]. @@ -346,6 +348,7 @@ + Ensure there are no items selected. diff --git a/doc/classes/OS.xml b/doc/classes/OS.xml index 1a3cdc34d78..d38a89874c7 100644 --- a/doc/classes/OS.xml +++ b/doc/classes/OS.xml @@ -127,7 +127,7 @@ - + Returns the audio driver name for the given index. @@ -418,7 +418,7 @@ - + diff --git a/doc/classes/OptionButton.xml b/doc/classes/OptionButton.xml index 99571061776..8cb53dd98e6 100644 --- a/doc/classes/OptionButton.xml +++ b/doc/classes/OptionButton.xml @@ -198,6 +198,7 @@ + This signal is emitted when user navigated to an item using [code]ui_up[/code] or [code]ui_down[/code] action. ID of the item selected is passed as argument (if no IDs were added, ID will be just the item index). diff --git a/doc/classes/PopupMenu.xml b/doc/classes/PopupMenu.xml index 12bff45291d..166a4be2b05 100644 --- a/doc/classes/PopupMenu.xml +++ b/doc/classes/PopupMenu.xml @@ -495,6 +495,7 @@ + This event is emitted when user navigated to an item of some id using [code]ui_up[/code] or [code]ui_down[/code] action. diff --git a/doc/classes/Vector2.xml b/doc/classes/Vector2.xml index c9fc7d3fb59..5ffe8076066 100644 --- a/doc/classes/Vector2.xml +++ b/doc/classes/Vector2.xml @@ -87,7 +87,7 @@ - Returns the 2-dimensional analog of the cross product with [code]b[/code]. + Returns the 2-dimensional analog of the cross product with the given Vector2. diff --git a/scene/gui/item_list.cpp b/scene/gui/item_list.cpp index fa7c9e091e1..ecd98f054de 100644 --- a/scene/gui/item_list.cpp +++ b/scene/gui/item_list.cpp @@ -1434,7 +1434,7 @@ void ItemList::_bind_methods() { ClassDB::bind_method(D_METHOD("is_selected", "idx"), &ItemList::is_selected); ClassDB::bind_method(D_METHOD("get_selected_items"), &ItemList::get_selected_items); - ClassDB::bind_method(D_METHOD("move_item", "p_from_idx", "p_to_idx"), &ItemList::move_item); + ClassDB::bind_method(D_METHOD("move_item", "from_idx", "to_idx"), &ItemList::move_item); ClassDB::bind_method(D_METHOD("get_item_count"), &ItemList::get_item_count); ClassDB::bind_method(D_METHOD("remove_item", "idx"), &ItemList::remove_item); diff --git a/servers/arvr_server.cpp b/servers/arvr_server.cpp index f9d402fe7b2..f48bedbdac0 100644 --- a/servers/arvr_server.cpp +++ b/servers/arvr_server.cpp @@ -58,6 +58,8 @@ void ARVRServer::_bind_methods() { ClassDB::bind_method(D_METHOD("get_primary_interface"), &ARVRServer::get_primary_interface); ClassDB::bind_method(D_METHOD("set_primary_interface", "interface"), &ARVRServer::set_primary_interface); + ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "primary_interface"), "set_primary_interface", "get_primary_interface"); + ClassDB::bind_method(D_METHOD("get_last_process_usec"), &ARVRServer::get_last_process_usec); ClassDB::bind_method(D_METHOD("get_last_commit_usec"), &ARVRServer::get_last_commit_usec); ClassDB::bind_method(D_METHOD("get_last_frame_usec"), &ARVRServer::get_last_frame_usec);