feat(engine): implement toggle event
This commit is contained in:
parent
4d3b1a5a59
commit
70d97bf90d
|
@ -82,6 +82,7 @@ pub enum EventType {
|
|||
Enabled,
|
||||
DisableRequest,
|
||||
EnableRequest,
|
||||
ToggleRequest,
|
||||
SecureInputEnabled(internal::SecureInputEnabledEvent),
|
||||
SecureInputDisabled,
|
||||
|
||||
|
|
|
@ -93,6 +93,10 @@ impl Middleware for DisableMiddleware {
|
|||
*enabled = false;
|
||||
has_status_changed = true;
|
||||
}
|
||||
EventType::ToggleRequest => {
|
||||
*enabled = !*enabled;
|
||||
has_status_changed = true;
|
||||
}
|
||||
_ => {}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user