aboutsummaryrefslogtreecommitdiff
path: root/src/gui/tool_sidebar.rs
diff options
context:
space:
mode:
authorArne Dußin2020-12-27 21:54:31 +0100
committerArne Dußin2020-12-27 21:54:31 +0100
commit53d376eaeef991850d35318b147f75c8f103319d (patch)
tree7e95a1666818dc7a804b145f263bdb4b76fef83a /src/gui/tool_sidebar.rs
parent2d2f45df9d47db25ac5a91c8f926a025c3a5dc7a (diff)
downloadgraf_karto-53d376eaeef991850d35318b147f75c8f103319d.tar.gz
graf_karto-53d376eaeef991850d35318b147f75c8f103319d.zip
Change to polygongraph instead of polygon in roomtool
The polygon room tool used a convoluted process for determining what the user actually wants to draw. I have changed to the polygon graph instead, which makes the checks easier and restricts the user a bit less. In the process however I found a serious problem with my handling float, so everything needed to change to margin compares (which I of course should have done in the beginning. Guys, take the warning seriously and don't ignore it for ten years like I did. It will come back to haunt you.. apparently) instead of direct equality.
Diffstat (limited to 'src/gui/tool_sidebar.rs')
-rw-r--r--src/gui/tool_sidebar.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/tool_sidebar.rs b/src/gui/tool_sidebar.rs
index e6b8867..b7618e0 100644
--- a/src/gui/tool_sidebar.rs
+++ b/src/gui/tool_sidebar.rs
@@ -3,7 +3,7 @@
// TODO: Currently, the keyboard shortcuts for tools are handled by the editor, but a lot speaks for
// them being handled by the ToolSidebar instead.
-use crate::math::{Rect, Surface, Vec2};
+use crate::math::{ExactSurface, Rect, Vec2};
use crate::tool::ToolType;
use crate::Editor;
use raylib::core::texture::Texture2D;