diff --git a/doc/base/classes.xml b/doc/base/classes.xml index a3a03e39c06..c0474c3e2f0 100644 --- a/doc/base/classes.xml +++ b/doc/base/classes.xml @@ -2039,6 +2039,8 @@ + 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. @@ -2047,6 +2049,7 @@ + Add custom cancel button to the dialog and return the created button. @@ -2200,6 +2203,7 @@ + Emmited when frame is changed. @@ -5324,12 +5328,14 @@ + Called when button is pressed. + Called when button is toggled (only if toggle_mode is active). @@ -5350,6 +5356,7 @@ + Return true if mouse entered the button before it exit. @@ -5405,6 +5412,7 @@ + This signal is emitted when the button was released. @@ -5422,12 +5430,16 @@ + The normal state(Are not pressed, not hovered, not toggled and enabled) of buttons. + The state of buttons are pressed. + The state of buttons are hovered. + The state of buttons are disabled. @@ -7691,6 +7703,7 @@ + Return a new color blended with anothor one. @@ -11577,6 +11590,7 @@ Returns an empty String "" at the end of the list. + Should put children to the top left corner instead of center of the container. diff --git a/scene/gui/dialogs.cpp b/scene/gui/dialogs.cpp index d00dacd2563..51242d89bdc 100644 --- a/scene/gui/dialogs.cpp +++ b/scene/gui/dialogs.cpp @@ -285,7 +285,7 @@ Button* AcceptDialog::add_cancel(const String &p_cancel) { String c = p_cancel; if (p_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"); return b; }