1
0
mirror of https://github.com/emilk/egui.git synced 2026-06-27 15:13:12 -04:00

Added Extra1 & Extra2 pointer buttons (#1603)

Extra1 is usually extra back button on most mice & Extra2 is usually extra forward button.
This commit is contained in:
sy1ntexx
2022-05-11 23:44:00 +03:00
committed by GitHub
parent 9624de6c41
commit d850b47f9e
5 changed files with 17 additions and 1 deletions

View File

@@ -14,6 +14,8 @@ pub fn button_from_mouse_event(event: &web_sys::MouseEvent) -> Option<egui::Poin
0 => Some(egui::PointerButton::Primary),
1 => Some(egui::PointerButton::Middle),
2 => Some(egui::PointerButton::Secondary),
3 => Some(egui::PointerButton::Extra1),
4 => Some(egui::PointerButton::Extra2),
_ => None,
}
}