Uncheck 'Pressed' if toggle_mode is unchecked

This commit is contained in:
georgikoemdzhiev 2019-10-18 17:38:56 +01:00
parent 67e4082b1e
commit 8674e5c0bd

View File

@ -271,6 +271,11 @@ BaseButton::DrawMode BaseButton::get_draw_mode() const {
}
void BaseButton::set_toggle_mode(bool p_on) {
// Make sure to set 'pressed' to false if we are not in toggle mode
if (!p_on) {
set_pressed(false);
}
toggle_mode = p_on;
}