mirror of
https://github.com/godotengine/godot.git
synced 2024-12-03 09:52:18 +08:00
Uncheck 'Pressed' if toggle_mode is unchecked
This commit is contained in:
parent
67e4082b1e
commit
8674e5c0bd
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user