- Fix BaseButton "Click on Press" issue. Now a button correctly show its visual "Pressed" status when "Click on Press" is enabled and the button is clicked.
This commit is contained in:
parent
88d64e7735
commit
41d1f9b7d6
@ -55,6 +55,9 @@ void BaseButton::_input_event(InputEvent p_event) {
|
|||||||
if (b.pressed) {
|
if (b.pressed) {
|
||||||
|
|
||||||
if (!toggle_mode) { //mouse press attempt
|
if (!toggle_mode) { //mouse press attempt
|
||||||
|
|
||||||
|
status.press_attempt=true;
|
||||||
|
status.pressing_inside=true;
|
||||||
|
|
||||||
pressed();
|
pressed();
|
||||||
emit_signal("pressed");
|
emit_signal("pressed");
|
||||||
@ -71,8 +74,15 @@ void BaseButton::_input_event(InputEvent p_event) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
} else {
|
||||||
|
|
||||||
|
if (status.press_attempt &&status.pressing_inside) {
|
||||||
|
pressed();
|
||||||
|
emit_signal("pressed");
|
||||||
|
}
|
||||||
|
status.press_attempt=false;
|
||||||
}
|
}
|
||||||
|
update();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user