show-hide binding

This commit is contained in:
galister
2024-02-01 19:49:37 +01:00
parent 22f94671e2
commit 832e5a7ecb
7 changed files with 66 additions and 5 deletions

View File

@@ -147,6 +147,15 @@ pub fn openvr_run(running: Arc<AtomicBool>) -> Result<(), BackendError> {
input_source.update(&mut input_mngr, &mut system_mngr, &mut state);
state.input_state.post_update();
if state
.input_state
.pointers
.iter()
.any(|p| p.now.show_hide && !p.before.show_hide)
{
overlays.show_hide();
}
overlays
.iter_mut()
.for_each(|o| o.state.auto_movement(&mut state));