From 496226cec522aaddb76597992b04d108c28b585b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Fri, 29 Apr 2016 18:14:24 +0200 Subject: [PATCH] classref: sync with 2.0 branch --- classes/class_acceptdialog.rst | 6 ++ classes/class_basebutton.rst | 14 ++-- classes/class_boxcontainer.rst | 14 +++- classes/class_color.rst | 2 + classes/class_dictionary.rst | 6 ++ classes/class_filedialog.rst | 14 +++- classes/class_gdfunctionstate.rst | 2 + classes/class_scrollcontainer.rst | 16 +++++ classes/class_splitcontainer.rst | 12 ++-- classes/class_streamplayer.rst | 102 +++++++++++++++--------------- classes/class_stringarray.rst | 6 ++ classes/class_vector2.rst | 2 + 12 files changed, 131 insertions(+), 65 deletions(-) diff --git a/classes/class_acceptdialog.rst b/classes/class_acceptdialog.rst index 190800b7c..e24490eda 100644 --- a/classes/class_acceptdialog.rst +++ b/classes/class_acceptdialog.rst @@ -82,10 +82,16 @@ Return true if the dialog will be hidden when accepted (default true). - :ref:`Button` **add_button** **(** :ref:`String` text, :ref:`bool` right=false, :ref:`String` action="" **)** +Add custom button to the dialog and return the created button. + +The button titled with *text* and the *action* will be passed to :ref:`custom_action` signal when it is pressed. + .. _class_AcceptDialog_add_cancel: - :ref:`Button` **add_cancel** **(** :ref:`String` name **)** +Add custom cancel button to the dialog and return the created button. + .. _class_AcceptDialog_register_text_enter: - :ref:`LineEdit` **register_text_enter** **(** :ref:`Object` line_edit **)** diff --git a/classes/class_basebutton.rst b/classes/class_basebutton.rst index aa4a2b09d..0ca25d7ee 100644 --- a/classes/class_basebutton.rst +++ b/classes/class_basebutton.rst @@ -56,10 +56,10 @@ Signals Numeric Constants ----------------- -- **DRAW_NORMAL** = **0** -- **DRAW_PRESSED** = **1** -- **DRAW_HOVER** = **2** -- **DRAW_DISABLED** = **3** +- **DRAW_NORMAL** = **0** --- The normal state (i.e. not pressed, not hovered, not toggled and enabled) of buttons. +- **DRAW_PRESSED** = **1** --- The state of buttons are pressed. +- **DRAW_HOVER** = **2** --- The state of buttons are hovered. +- **DRAW_DISABLED** = **3** --- The state of buttons are disabled. Description ----------- @@ -73,10 +73,14 @@ Member Function Description - void **_pressed** **(** **)** virtual +Called when button is pressed. + .. _class_BaseButton__toggled: - void **_toggled** **(** :ref:`bool` pressed **)** virtual +Called when button is toggled (only if toggle_mode is active). + .. _class_BaseButton_set_pressed: - void **set_pressed** **(** :ref:`bool` pressed **)** @@ -93,6 +97,8 @@ If toggle_mode is active, return whether the button is toggled. If toggle_mode i - :ref:`bool` **is_hovered** **(** **)** const +Return true if mouse entered the button before it exit. + .. _class_BaseButton_set_toggle_mode: - void **set_toggle_mode** **(** :ref:`bool` enabled **)** diff --git a/classes/class_boxcontainer.rst b/classes/class_boxcontainer.rst index 703fb03e2..69993e069 100644 --- a/classes/class_boxcontainer.rst +++ b/classes/class_boxcontainer.rst @@ -31,9 +31,9 @@ Member Functions Numeric Constants ----------------- -- **ALIGN_BEGIN** = **0** -- **ALIGN_CENTER** = **1** -- **ALIGN_END** = **2** +- **ALIGN_BEGIN** = **0** --- Align children with beginning of the container. +- **ALIGN_CENTER** = **1** --- Align children with center of the container. +- **ALIGN_END** = **2** --- Align children with end of the container. Description ----------- @@ -47,12 +47,20 @@ Member Function Description - void **add_spacer** **(** :ref:`bool` begin **)** +Add a control to the box as a spacer. + +If *begin* is true the spacer control will be inserted in front of other children. + .. _class_BoxContainer_get_alignment: - :ref:`int` **get_alignment** **(** **)** const +Return the alignment of children in the container. + .. _class_BoxContainer_set_alignment: - void **set_alignment** **(** :ref:`int` alignment **)** +Set the alignment of children in the container(Must be one of ALIGN_BEGIN, ALIGN_CENTER or ALIGN_END). + diff --git a/classes/class_color.rst b/classes/class_color.rst index c0f18f362..911343d0d 100644 --- a/classes/class_color.rst +++ b/classes/class_color.rst @@ -69,6 +69,8 @@ Member Function Description - :ref:`Color` **blend** **(** :ref:`Color` over **)** +Return a new color blended with anothor one. + .. _class_Color_contrasted: - :ref:`Color` **contrasted** **(** **)** diff --git a/classes/class_dictionary.rst b/classes/class_dictionary.rst index a8a8db03f..44b15ae58 100644 --- a/classes/class_dictionary.rst +++ b/classes/class_dictionary.rst @@ -25,6 +25,8 @@ Member Functions +------------------------------+-----------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`has` **(** var value **)** | +------------------------------+-----------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`has_all` **(** :ref:`Array` values **)** | ++------------------------------+-----------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`hash` **(** **)** | +------------------------------+-----------------------------------------------------------------------------------------------+ | :ref:`Array` | :ref:`keys` **(** **)** | @@ -68,6 +70,10 @@ Erase a dictionary key/value pair by key. Return true if the dictionary has a given key. +.. _class_Dictionary_has_all: + +- :ref:`bool` **has_all** **(** :ref:`Array` values **)** + .. _class_Dictionary_hash: - :ref:`int` **hash** **(** **)** diff --git a/classes/class_filedialog.rst b/classes/class_filedialog.rst index f4c075560..d8c21eddf 100644 --- a/classes/class_filedialog.rst +++ b/classes/class_filedialog.rst @@ -66,9 +66,9 @@ Numeric Constants - **MODE_OPEN_FILES** = **1** --- The dialog allows the selection of multiple files. - **MODE_OPEN_DIR** = **2** --- The dialog functions as a folder selector, disallowing the selection of any file. - **MODE_SAVE_FILE** = **3** --- The dialog will warn when a file exists. -- **ACCESS_RESOURCES** = **0** -- **ACCESS_USERDATA** = **1** -- **ACCESS_FILESYSTEM** = **2** +- **ACCESS_RESOURCES** = **0** --- The dialog allows the selection of file and directory. +- **ACCESS_USERDATA** = **1** --- The dialog allows ascess files under :ref:`Resource` path(res://) . +- **ACCESS_FILESYSTEM** = **2** --- The dialog allows ascess files in whole file system. Description ----------- @@ -140,18 +140,26 @@ Get the file dialog mode from the MODE\_\* enum. - void **set_access** **(** :ref:`int` access **)** +Set the file access permission of the dialog(Must be one of :ref:`ACCESS_RESOURCES`, :ref:`ACCESS_USERDATA` or :ref:`ACCESS_FILESYSTEM`). + .. _class_FileDialog_get_access: - :ref:`int` **get_access** **(** **)** const +Return the file access permission of the dialog. + .. _class_FileDialog_set_show_hidden_files: - void **set_show_hidden_files** **(** :ref:`bool` show **)** +Set the dialog should show hidden files. + .. _class_FileDialog_is_showing_hidden_files: - :ref:`bool` **is_showing_hidden_files** **(** **)** const +Return true if the diaog allows show hidden files. + .. _class_FileDialog_invalidate: - void **invalidate** **(** **)** diff --git a/classes/class_gdfunctionstate.rst b/classes/class_gdfunctionstate.rst index 762339320..f93a1035b 100644 --- a/classes/class_gdfunctionstate.rst +++ b/classes/class_gdfunctionstate.rst @@ -35,4 +35,6 @@ Member Function Description - :ref:`bool` **is_valid** **(** **)** const +Should put children to the top left corner instead of center of the container. + diff --git a/classes/class_scrollcontainer.rst b/classes/class_scrollcontainer.rst index 61e4eb261..4b65f1861 100644 --- a/classes/class_scrollcontainer.rst +++ b/classes/class_scrollcontainer.rst @@ -48,32 +48,48 @@ Member Function Description - void **set_enable_h_scroll** **(** :ref:`bool` enable **)** +Set allows horizontal scrool. + .. _class_ScrollContainer_is_h_scroll_enabled: - :ref:`bool` **is_h_scroll_enabled** **(** **)** const +Return true if horizontal scrool is allowed. + .. _class_ScrollContainer_set_enable_v_scroll: - void **set_enable_v_scroll** **(** :ref:`bool` enable **)** +Set allows vertical scrool. + .. _class_ScrollContainer_is_v_scroll_enabled: - :ref:`bool` **is_v_scroll_enabled** **(** **)** const +Return true if vertical scrool is allowed. + .. _class_ScrollContainer_set_h_scroll: - void **set_h_scroll** **(** :ref:`int` val **)** +Set horizontal scroll value. + .. _class_ScrollContainer_get_h_scroll: - :ref:`int` **get_h_scroll** **(** **)** const +Return current horizontal scroll value. + .. _class_ScrollContainer_set_v_scroll: - void **set_v_scroll** **(** :ref:`int` val **)** +Set vertical scroll value. + .. _class_ScrollContainer_get_v_scroll: - :ref:`int` **get_v_scroll** **(** **)** const +Return current vertical scroll value. + diff --git a/classes/class_splitcontainer.rst b/classes/class_splitcontainer.rst index 7d71f47b2..e47714a47 100644 --- a/classes/class_splitcontainer.rst +++ b/classes/class_splitcontainer.rst @@ -42,9 +42,9 @@ Signals Numeric Constants ----------------- -- **DRAGGER_VISIBLE** = **0** -- **DRAGGER_HIDDEN** = **1** -- **DRAGGER_HIDDEN_COLLAPSED** = **2** +- **DRAGGER_VISIBLE** = **0** --- The split dragger is visible. +- **DRAGGER_HIDDEN** = **1** --- The split dragger is invisible. +- **DRAGGER_HIDDEN_COLLAPSED** = **2** --- The split dragger is invisible and collapsed. Description ----------- @@ -76,14 +76,18 @@ Set if the split must be collapsed. - :ref:`bool` **is_collapsed** **(** **)** const -Return if the split is collapsed. +Return true if the split is collapsed. .. _class_SplitContainer_set_dragger_visibility: - void **set_dragger_visibility** **(** :ref:`int` mode **)** +Set visibility of the split dragger(*mode* must be one of :ref:`DRAGGER_VISIBLE`, :ref:`DRAGGER_HIDDEN` or :ref:`DRAGGER_HIDDEN_COLLAPSED`). + .. _class_SplitContainer_get_dragger_visibility: - :ref:`int` **get_dragger_visibility** **(** **)** const +Return visibility of the split dragger(One of :ref:`DRAGGER_VISIBLE`, :ref:`DRAGGER_HIDDEN` or :ref:`DRAGGER_HIDDEN_COLLAPSED`). + diff --git a/classes/class_streamplayer.rst b/classes/class_streamplayer.rst index 7e2a0fdc1..f6da64b63 100644 --- a/classes/class_streamplayer.rst +++ b/classes/class_streamplayer.rst @@ -18,55 +18,55 @@ Base class for audio stream playback. Member Functions ---------------- -+------------------------------+---------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_stream` **(** Stream stream **)** | -+------------------------------+---------------------------------------------------------------------------------------------------------------------+ -| Stream | :ref:`get_stream` **(** **)** const | -+------------------------------+---------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`play` **(** :ref:`float` offset=0 **)** | -+------------------------------+---------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`stop` **(** **)** | -+------------------------------+---------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_playing` **(** **)** const | -+------------------------------+---------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_paused` **(** :ref:`bool` paused **)** | -+------------------------------+---------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_paused` **(** **)** const | -+------------------------------+---------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_loop` **(** :ref:`bool` enabled **)** | -+------------------------------+---------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`has_loop` **(** **)** const | -+------------------------------+---------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_volume` **(** :ref:`float` volume **)** | -+------------------------------+---------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_volume` **(** **)** const | -+------------------------------+---------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_volume_db` **(** :ref:`float` db **)** | -+------------------------------+---------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_volume_db` **(** **)** const | -+------------------------------+---------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_buffering_msec` **(** :ref:`int` msec **)** | -+------------------------------+---------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_buffering_msec` **(** **)** const | -+------------------------------+---------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_loop_restart_time` **(** :ref:`float` secs **)** | -+------------------------------+---------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_loop_restart_time` **(** **)** const | -+------------------------------+---------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_stream_name` **(** **)** const | -+------------------------------+---------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_loop_count` **(** **)** const | -+------------------------------+---------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_pos` **(** **)** const | -+------------------------------+---------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`seek_pos` **(** :ref:`float` time **)** | -+------------------------------+---------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_autoplay` **(** :ref:`bool` enabled **)** | -+------------------------------+---------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`has_autoplay` **(** **)** const | -+------------------------------+---------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_length` **(** **)** const | -+------------------------------+---------------------------------------------------------------------------------------------------------------------+ ++----------------------------------------+---------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_stream` **(** :ref:`AudioStream` stream **)** | ++----------------------------------------+---------------------------------------------------------------------------------------------------------------------+ +| :ref:`AudioStream` | :ref:`get_stream` **(** **)** const | ++----------------------------------------+---------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`play` **(** :ref:`float` offset=0 **)** | ++----------------------------------------+---------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`stop` **(** **)** | ++----------------------------------------+---------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_playing` **(** **)** const | ++----------------------------------------+---------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_paused` **(** :ref:`bool` paused **)** | ++----------------------------------------+---------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_paused` **(** **)** const | ++----------------------------------------+---------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_loop` **(** :ref:`bool` enabled **)** | ++----------------------------------------+---------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`has_loop` **(** **)** const | ++----------------------------------------+---------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_volume` **(** :ref:`float` volume **)** | ++----------------------------------------+---------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_volume` **(** **)** const | ++----------------------------------------+---------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_volume_db` **(** :ref:`float` db **)** | ++----------------------------------------+---------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_volume_db` **(** **)** const | ++----------------------------------------+---------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_buffering_msec` **(** :ref:`int` msec **)** | ++----------------------------------------+---------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_buffering_msec` **(** **)** const | ++----------------------------------------+---------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_loop_restart_time` **(** :ref:`float` secs **)** | ++----------------------------------------+---------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_loop_restart_time` **(** **)** const | ++----------------------------------------+---------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_stream_name` **(** **)** const | ++----------------------------------------+---------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_loop_count` **(** **)** const | ++----------------------------------------+---------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_pos` **(** **)** const | ++----------------------------------------+---------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`seek_pos` **(** :ref:`float` time **)** | ++----------------------------------------+---------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_autoplay` **(** :ref:`bool` enabled **)** | ++----------------------------------------+---------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`has_autoplay` **(** **)** const | ++----------------------------------------+---------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_length` **(** **)** const | ++----------------------------------------+---------------------------------------------------------------------------------------------------------------------+ Signals ------- @@ -83,13 +83,13 @@ Member Function Description .. _class_StreamPlayer_set_stream: -- void **set_stream** **(** Stream stream **)** +- void **set_stream** **(** :ref:`AudioStream` stream **)** Set the :ref:`EventStream` this player will play. .. _class_StreamPlayer_get_stream: -- Stream **get_stream** **(** **)** const +- :ref:`AudioStream` **get_stream** **(** **)** const Return the currently assigned stream. diff --git a/classes/class_stringarray.rst b/classes/class_stringarray.rst index 7f5c85c5f..54706091e 100644 --- a/classes/class_stringarray.rst +++ b/classes/class_stringarray.rst @@ -40,10 +40,14 @@ Member Function Description - void **push_back** **(** :ref:`String` string **)** +Append a string element at end of the array. + .. _class_StringArray_resize: - void **resize** **(** :ref:`int` idx **)** +Reset the size of the array. + .. _class_StringArray_set: - void **set** **(** :ref:`int` idx, :ref:`String` string **)** @@ -52,6 +56,8 @@ Member Function Description - :ref:`int` **size** **(** **)** +Return the size of the array. + .. _class_StringArray_StringArray: - :ref:`StringArray` **StringArray** **(** :ref:`Array` from **)** diff --git a/classes/class_vector2.rst b/classes/class_vector2.rst index df489abde..f45e58bdd 100644 --- a/classes/class_vector2.rst +++ b/classes/class_vector2.rst @@ -128,6 +128,8 @@ Remove the fractional part of x and y. - :ref:`Vector2` **floorf** **(** **)** +Remove the fractional part of x and y. + .. _class_Vector2_get_aspect: - :ref:`float` **get_aspect** **(** **)**