mirror of
https://github.com/godotengine/godot.git
synced 2026-01-06 10:11:57 +03:00
doc: Use self-closing tags for return and argument
For the time being we don't support writing a description for those, preferring
having all details in the method's description.
Using self-closing tags saves half the lines, and prevents contributors from
thinking that they should write the argument or return documentation there.
(cherry picked from commit 7adf4cc9b5)
This commit is contained in:
@@ -10,14 +10,10 @@
|
||||
</tutorials>
|
||||
<methods>
|
||||
<method name="add_button">
|
||||
<return type="Button">
|
||||
</return>
|
||||
<argument index="0" name="text" type="String">
|
||||
</argument>
|
||||
<argument index="1" name="right" type="bool" default="false">
|
||||
</argument>
|
||||
<argument index="2" name="action" type="String" default="""">
|
||||
</argument>
|
||||
<return type="Button" />
|
||||
<argument index="0" name="text" type="String" />
|
||||
<argument index="1" name="right" type="bool" default="false" />
|
||||
<argument index="2" name="action" type="String" default="""" />
|
||||
<description>
|
||||
Adds a button with label [code]text[/code] and a custom [code]action[/code] to the dialog and returns the created button. [code]action[/code] will be passed to the [signal custom_action] signal when pressed.
|
||||
If [code]true[/code], [code]right[/code] will place the button to the right of any sibling buttons.
|
||||
@@ -25,43 +21,35 @@
|
||||
</description>
|
||||
</method>
|
||||
<method name="add_cancel">
|
||||
<return type="Button">
|
||||
</return>
|
||||
<argument index="0" name="name" type="String">
|
||||
</argument>
|
||||
<return type="Button" />
|
||||
<argument index="0" name="name" type="String" />
|
||||
<description>
|
||||
Adds a button with label [code]name[/code] and a cancel action to the dialog and returns the created button.
|
||||
You can use [method remove_button] method to remove a button created with this method from the dialog.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_label">
|
||||
<return type="Label">
|
||||
</return>
|
||||
<return type="Label" />
|
||||
<description>
|
||||
Returns the label used for built-in text.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_ok">
|
||||
<return type="Button">
|
||||
</return>
|
||||
<return type="Button" />
|
||||
<description>
|
||||
Returns the OK [Button] instance.
|
||||
</description>
|
||||
</method>
|
||||
<method name="register_text_enter">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="line_edit" type="Node">
|
||||
</argument>
|
||||
<return type="void" />
|
||||
<argument index="0" name="line_edit" type="Node" />
|
||||
<description>
|
||||
Registers a [LineEdit] in the dialog. When the enter key is pressed, the dialog will be accepted.
|
||||
</description>
|
||||
</method>
|
||||
<method name="remove_button">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="button" type="Control">
|
||||
</argument>
|
||||
<return type="void" />
|
||||
<argument index="0" name="button" type="Control" />
|
||||
<description>
|
||||
Removes the [code]button[/code] from the dialog. Does NOT free the [code]button[/code]. The [code]button[/code] must be a [Button] added with [method add_button] or [method add_cancel] method. After removal, pressing the [code]button[/code] will no longer emit this dialog's [signal custom_action] signal or cancel this dialog.
|
||||
</description>
|
||||
@@ -87,8 +75,7 @@
|
||||
</description>
|
||||
</signal>
|
||||
<signal name="custom_action">
|
||||
<argument index="0" name="action" type="String">
|
||||
</argument>
|
||||
<argument index="0" name="action" type="String" />
|
||||
<description>
|
||||
Emitted when a custom button is pressed. See [method add_button].
|
||||
</description>
|
||||
|
||||
Reference in New Issue
Block a user