mirror of
https://github.com/emilk/egui.git
synced 2026-09-01 06:10:06 -04:00
@@ -641,7 +641,7 @@ impl MenuState {
|
|||||||
if let Some(sub_menu) = self.current_submenu() {
|
if let Some(sub_menu) = self.current_submenu() {
|
||||||
if let Some(pos) = pointer.hover_pos() {
|
if let Some(pos) = pointer.hover_pos() {
|
||||||
let rect = sub_menu.read().rect;
|
let rect = sub_menu.read().rect;
|
||||||
return rect.intesects_ray(pos, pointer.velocity().normalized());
|
return rect.intersects_ray(pos, pointer.velocity().normalized());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
false
|
false
|
||||||
|
|||||||
@@ -607,7 +607,7 @@ impl Rect {
|
|||||||
|
|
||||||
impl Rect {
|
impl Rect {
|
||||||
/// Does this Rect intersect the given ray (where `d` is normalized)?
|
/// Does this Rect intersect the given ray (where `d` is normalized)?
|
||||||
pub fn intesects_ray(&self, o: Pos2, d: Vec2) -> bool {
|
pub fn intersects_ray(&self, o: Pos2, d: Vec2) -> bool {
|
||||||
let mut tmin = -f32::INFINITY;
|
let mut tmin = -f32::INFINITY;
|
||||||
let mut tmax = f32::INFINITY;
|
let mut tmax = f32::INFINITY;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user