aboutsummaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorArne Dußin2020-11-23 23:38:52 +0100
committerArne Dußin2020-11-23 23:38:52 +0100
commite62275d90d3ebf379e8ab268cb77d8eaf6d1cf07 (patch)
tree5f8aee175d048e40b8b496157816177e0597e0f9 /src/gui
parentbff1955c38480f2dffd0a10c16ef46dc11320752 (diff)
parent3b0c99351da92410bbfaba233e40376b767cb64e (diff)
downloadgraf_karto-e62275d90d3ebf379e8ab268cb77d8eaf6d1cf07.tar.gz
graf_karto-e62275d90d3ebf379e8ab268cb77d8eaf6d1cf07.zip
Merge branch 'triangulation' into polygon-rooms
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/tool_sidebar.rs4
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) {