diff options
| author | Arne Dußin | 2020-12-16 13:34:56 +0100 |
|---|---|---|
| committer | Arne Dußin | 2020-12-16 13:34:56 +0100 |
| commit | 82d11b7d3e15d8175accf7579db1fbe528fc6583 (patch) | |
| tree | be9a5601e99608966d4ccd146c3bfb3a70c7fc02 /src/map/mappable.rs | |
| parent | 9799d3c6a8f0c242668203a1c70d7b6cfed3e855 (diff) | |
| download | graf_karto-82d11b7d3e15d8175accf7579db1fbe528fc6583.tar.gz graf_karto-82d11b7d3e15d8175accf7579db1fbe528fc6583.zip | |
Add constant for default colours and selection tool
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>; |
