Add more documentations and fix AcceptDialog::add_cancel
This commit is contained in:
parent
4de3f8944e
commit
5c61e17c10
2 changed files with 15 additions and 1 deletions
|
@ -2041,6 +2041,8 @@
|
||||||
<argument index="2" name="action" type="String" default="""">
|
<argument index="2" name="action" type="String" default="""">
|
||||||
</argument>
|
</argument>
|
||||||
<description>
|
<description>
|
||||||
|
Add custom button to the dialog and return the created button.
|
||||||
|
The button titled with [i]text[/i] and the [i]action[/i] will be passed to [custom_action] signal when it is pressed.
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="add_cancel">
|
<method name="add_cancel">
|
||||||
|
@ -2049,6 +2051,7 @@
|
||||||
<argument index="0" name="name" type="String">
|
<argument index="0" name="name" type="String">
|
||||||
</argument>
|
</argument>
|
||||||
<description>
|
<description>
|
||||||
|
Add custom cancel button to the dialog and return the created button.
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="register_text_enter">
|
<method name="register_text_enter">
|
||||||
|
@ -2202,6 +2205,7 @@
|
||||||
<signals>
|
<signals>
|
||||||
<signal name="frame_changed">
|
<signal name="frame_changed">
|
||||||
<description>
|
<description>
|
||||||
|
Emmited when frame is changed.
|
||||||
</description>
|
</description>
|
||||||
</signal>
|
</signal>
|
||||||
</signals>
|
</signals>
|
||||||
|
@ -5434,12 +5438,14 @@
|
||||||
<methods>
|
<methods>
|
||||||
<method name="_pressed" qualifiers="virtual">
|
<method name="_pressed" qualifiers="virtual">
|
||||||
<description>
|
<description>
|
||||||
|
Called when button is pressed.
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="_toggled" qualifiers="virtual">
|
<method name="_toggled" qualifiers="virtual">
|
||||||
<argument index="0" name="pressed" type="bool">
|
<argument index="0" name="pressed" type="bool">
|
||||||
</argument>
|
</argument>
|
||||||
<description>
|
<description>
|
||||||
|
Called when button is toggled (only if toggle_mode is active).
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="set_pressed">
|
<method name="set_pressed">
|
||||||
|
@ -5460,6 +5466,7 @@
|
||||||
<return type="bool">
|
<return type="bool">
|
||||||
</return>
|
</return>
|
||||||
<description>
|
<description>
|
||||||
|
Return true if mouse entered the button before it exit.
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="set_toggle_mode">
|
<method name="set_toggle_mode">
|
||||||
|
@ -5515,6 +5522,7 @@
|
||||||
<signals>
|
<signals>
|
||||||
<signal name="released">
|
<signal name="released">
|
||||||
<description>
|
<description>
|
||||||
|
This signal is emitted when the button was released.
|
||||||
</description>
|
</description>
|
||||||
</signal>
|
</signal>
|
||||||
<signal name="toggled">
|
<signal name="toggled">
|
||||||
|
@ -5532,12 +5540,16 @@
|
||||||
</signals>
|
</signals>
|
||||||
<constants>
|
<constants>
|
||||||
<constant name="DRAW_NORMAL" value="0">
|
<constant name="DRAW_NORMAL" value="0">
|
||||||
|
The normal state(Are not pressed, not hovered, not toggled and enabled) of buttons.
|
||||||
</constant>
|
</constant>
|
||||||
<constant name="DRAW_PRESSED" value="1">
|
<constant name="DRAW_PRESSED" value="1">
|
||||||
|
The state of buttons are pressed.
|
||||||
</constant>
|
</constant>
|
||||||
<constant name="DRAW_HOVER" value="2">
|
<constant name="DRAW_HOVER" value="2">
|
||||||
|
The state of buttons are hovered.
|
||||||
</constant>
|
</constant>
|
||||||
<constant name="DRAW_DISABLED" value="3">
|
<constant name="DRAW_DISABLED" value="3">
|
||||||
|
The state of buttons are disabled.
|
||||||
</constant>
|
</constant>
|
||||||
</constants>
|
</constants>
|
||||||
</class>
|
</class>
|
||||||
|
@ -7801,6 +7813,7 @@
|
||||||
<argument index="0" name="over" type="Color">
|
<argument index="0" name="over" type="Color">
|
||||||
</argument>
|
</argument>
|
||||||
<description>
|
<description>
|
||||||
|
Return a new color blended with anothor one.
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="contrasted">
|
<method name="contrasted">
|
||||||
|
@ -12372,6 +12385,7 @@ Returns an empty String "" at the end of the list.
|
||||||
<return type="bool">
|
<return type="bool">
|
||||||
</return>
|
</return>
|
||||||
<description>
|
<description>
|
||||||
|
Should put children to the top left corner instead of center of the container.
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
</methods>
|
</methods>
|
||||||
|
|
|
@ -285,7 +285,7 @@ Button* AcceptDialog::add_cancel(const String &p_cancel) {
|
||||||
String c = p_cancel;
|
String c = p_cancel;
|
||||||
if (p_cancel=="")
|
if (p_cancel=="")
|
||||||
c="Cancel";
|
c="Cancel";
|
||||||
Button *b = swap_ok_cancel ? add_button("Cancel",true) : add_button("Cancel");
|
Button *b = swap_ok_cancel ? add_button(c,true) : add_button(c);
|
||||||
b->connect("pressed",this,"_closed");
|
b->connect("pressed",this,"_closed");
|
||||||
return b;
|
return b;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue