diff options
| author | Arne Dußin | 2020-11-21 20:55:47 +0100 |
|---|---|---|
| committer | Arne Dußin | 2020-11-21 20:55:47 +0100 |
| commit | abf55d8d46fc7d5cfccc9f778da6fca10b33d0cd (patch) | |
| tree | e2f849338a1ce9dfff44082fa7d6b8510385f6f9 /src/gui | |
| parent | 58ca374fab6dd90c4d7415bdcc98add002274894 (diff) | |
| download | graf_karto-abf55d8d46fc7d5cfccc9f778da6fca10b33d0cd.tar.gz graf_karto-abf55d8d46fc7d5cfccc9f778da6fca10b33d0cd.zip | |
Move containment of points/ lines into trait
Diffstat (limited to 'src/gui')
| -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) { |
