diff options
Diffstat (limited to 'src/gui/tool_sidebar.rs')
| -rw-r--r-- | src/gui/tool_sidebar.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gui/tool_sidebar.rs b/src/gui/tool_sidebar.rs index 46b53ea..7674c47 100644 --- a/src/gui/tool_sidebar.rs +++ b/src/gui/tool_sidebar.rs @@ -1,4 +1,4 @@ -use crate::math::{Rect, Vec2}; +use crate::math::{Rect, Surface, Vec2}; use crate::tool::ToolType; use crate::Editor; use raylib::core::texture::Texture2D; @@ -28,7 +28,7 @@ impl ToolSidebar { /// Check if the mouse is currently being captured by this GUI-element. In that case, /// everything else that might want to access the mouse will be blocked. pub fn mouse_captured(screen_height: u16, mouse_pos: Vec2<f32>) -> bool { - Self::panel_rect(screen_height).contains(mouse_pos) + Self::panel_rect(screen_height).contains_point(&mouse_pos) } pub fn draw(&self, screen_height: u16, rld: &mut impl RaylibDrawGui, editor: &mut Editor) { |
