From 82d11b7d3e15d8175accf7579db1fbe528fc6583 Mon Sep 17 00:00:00 2001 From: Arne Dußin Date: Wed, 16 Dec 2020 13:34:56 +0100 Subject: Add constant for default colours and selection tool --- src/map/mappable.rs | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/map/mappable.rs') diff --git a/src/map/mappable.rs b/src/map/mappable.rs index f75c990..b348c4b 100644 --- a/src/map/mappable.rs +++ b/src/map/mappable.rs @@ -11,6 +11,13 @@ pub trait Mappable { /// this must always be implemented. fn draw(&self, rld: &mut RaylibDrawHandle, transform: &Transform); + /// Set the selection status of this item. If it is selected, actions that concern all selected + /// items will be applied to this item as well. + fn set_selected(&mut self, selected: bool); + + /// Get if this item is currently selected. + fn selected(&self) -> bool; + /// Get the rectangle that contains the mappable object in its entirety without excess. fn bounding_rect(&self) -> Rect; -- cgit v1.2.3-70-g09d2