You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-04 12:00:25 +00:00
[Scene] Add SceneStringNames::pressed
This commit is contained in:
@@ -134,7 +134,7 @@ void BaseButton::_notification(int p_what) {
|
||||
void BaseButton::_pressed() {
|
||||
GDVIRTUAL_CALL(_pressed);
|
||||
pressed();
|
||||
emit_signal(SNAME("pressed"));
|
||||
emit_signal(SceneStringName(pressed));
|
||||
}
|
||||
|
||||
void BaseButton::_toggled(bool p_pressed) {
|
||||
@@ -161,7 +161,7 @@ void BaseButton::on_action_event(Ref<InputEvent> p_event) {
|
||||
status.pressed = !status.pressed;
|
||||
_unpress_group();
|
||||
if (button_group.is_valid()) {
|
||||
button_group->emit_signal(SNAME("pressed"), this);
|
||||
button_group->emit_signal(SceneStringName(pressed), this);
|
||||
}
|
||||
_toggled(status.pressed);
|
||||
_pressed();
|
||||
@@ -225,7 +225,7 @@ void BaseButton::set_pressed(bool p_pressed) {
|
||||
if (p_pressed) {
|
||||
_unpress_group();
|
||||
if (button_group.is_valid()) {
|
||||
button_group->emit_signal(SNAME("pressed"), this);
|
||||
button_group->emit_signal(SceneStringName(pressed), this);
|
||||
}
|
||||
}
|
||||
_toggled(status.pressed);
|
||||
@@ -367,7 +367,7 @@ void BaseButton::shortcut_input(const Ref<InputEvent> &p_event) {
|
||||
|
||||
_unpress_group();
|
||||
if (button_group.is_valid()) {
|
||||
button_group->emit_signal(SNAME("pressed"), this);
|
||||
button_group->emit_signal(SceneStringName(pressed), this);
|
||||
}
|
||||
|
||||
_toggled(status.pressed);
|
||||
|
||||
Reference in New Issue
Block a user