diff --git a/doc/classes/BaseButton.xml b/doc/classes/BaseButton.xml index cc95c97e680..c112aa2d923 100644 --- a/doc/classes/BaseButton.xml +++ b/doc/classes/BaseButton.xml @@ -17,7 +17,7 @@ - + Called when the button is toggled (only if [member toggle_mode] is active). @@ -98,9 +98,9 @@ - + - Emitted when the button was just toggled between pressed and normal states (only if [member toggle_mode] is active). The new state is contained in the [param button_pressed] argument. + Emitted when the button was just toggled between pressed and normal states (only if [member toggle_mode] is active). The new state is contained in the [param toggled_on] argument. diff --git a/scene/gui/base_button.cpp b/scene/gui/base_button.cpp index 3ac3ca7363e..f57afb66b30 100644 --- a/scene/gui/base_button.cpp +++ b/scene/gui/base_button.cpp @@ -468,12 +468,12 @@ void BaseButton::_bind_methods() { ClassDB::bind_method(D_METHOD("get_button_group"), &BaseButton::get_button_group); GDVIRTUAL_BIND(_pressed); - GDVIRTUAL_BIND(_toggled, "button_pressed"); + GDVIRTUAL_BIND(_toggled, "toggled_on"); ADD_SIGNAL(MethodInfo("pressed")); ADD_SIGNAL(MethodInfo("button_up")); ADD_SIGNAL(MethodInfo("button_down")); - ADD_SIGNAL(MethodInfo("toggled", PropertyInfo(Variant::BOOL, "button_pressed"))); + ADD_SIGNAL(MethodInfo("toggled", PropertyInfo(Variant::BOOL, "toggled_on"))); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "disabled"), "set_disabled", "is_disabled"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "toggle_mode"), "set_toggle_mode", "is_toggle_mode");