Merge pull request #817 from grabiller/radfac#004b
Fix BaseButton "Click on Press" issue. Now a button correctly show its...
This commit is contained in:
commit
b38118c5cb
1 changed files with 11 additions and 1 deletions
|
@ -56,6 +56,9 @@ void BaseButton::_input_event(InputEvent p_event) {
|
|||
|
||||
if (!toggle_mode) { //mouse press attempt
|
||||
|
||||
status.press_attempt=true;
|
||||
status.pressing_inside=true;
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue