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