aboutsummaryrefslogtreecommitdiff
path: root/src/tool/mod.rs
diff options
context:
space:
mode:
authorArne Dußin2020-11-20 20:00:28 +0100
committerArne Dußin2020-11-20 20:00:28 +0100
commitcf0cbe3fd28b2099b580edc1714b4d68bf7183cd (patch)
treeb03561c1ae7860cad247d089cb1ad728efa843ec /src/tool/mod.rs
parentf62dabcb390d4808739745c050dfba8e2826b214 (diff)
downloadgraf_karto-cf0cbe3fd28b2099b580edc1714b4d68bf7183cd.tar.gz
graf_karto-cf0cbe3fd28b2099b580edc1714b4d68bf7183cd.zip
Add simple tool sidebar gui
Diffstat (limited to 'src/tool/mod.rs')
-rw-r--r--src/tool/mod.rs10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/tool/mod.rs b/src/tool/mod.rs
index 3b9b845..e528b8f 100644
--- a/src/tool/mod.rs
+++ b/src/tool/mod.rs
@@ -14,7 +14,7 @@ use crate::transform::Transform;
use raylib::core::drawing::RaylibDrawHandle;
use raylib::RaylibHandle;
-#[derive(Debug)]
+#[derive(Copy, Clone, Debug, PartialEq)]
#[repr(u8)]
pub enum ToolType {
RoomTool,
@@ -29,7 +29,13 @@ pub trait Tool {
fn deactivate(&mut self) {}
fn update(&mut self, _map: &MapData, _rl: &RaylibHandle, _transform: &Transform) {}
- fn active_update(&mut self, map: &mut MapData, rl: &RaylibHandle, transform: &Transform);
+ fn active_update(
+ &mut self,
+ map: &mut MapData,
+ rl: &RaylibHandle,
+ transform: &Transform,
+ mouse_blocked: bool,
+ );
fn draw(&self, _map: &MapData, _rld: &mut RaylibDrawHandle, _transform: &Transform) {}