implement edit mode toggle

This commit is contained in:
galister
2025-11-12 20:32:40 +09:00
parent 52fb06eecc
commit 278420b2ce
6 changed files with 66 additions and 7 deletions

View File

@@ -544,6 +544,20 @@ pub fn openxr_run(
TaskType::ToggleSet(set) => {
overlays.switch_or_toggle_set(&mut app, set);
}
TaskType::ToggleEditMode => {
if !overlays.get_edit_mode() {
Toast::new(
ToastTopic::System,
"Edit mode enabled".into(),
"Hover overlays to see their options".into(),
)
.with_timeout(5.)
.with_sound(true)
.submit(&mut app);
}
overlays.set_edit_mode(!overlays.get_edit_mode());
}
#[cfg(feature = "wayvr")]
TaskType::WayVR(action) => {
wayvr_action(&mut app, &mut overlays, &action);