diff options
Diffstat (limited to 'src/map/mappable.rs')
| -rw-r--r-- | src/map/mappable.rs | 7 |
1 files changed, 7 insertions, 0 deletions
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<f64>; |
