Implement update_colors (#43)

Co-authored-by: RustyNixieTube <RustyNixieTube@users.noreply.github.com>
This commit is contained in:
RustyNixieTube
2021-03-26 20:50:52 +01:00
committed by Keavon Chambers
parent 543fc4fec1
commit e4073a112f
3 changed files with 15 additions and 1 deletions

View File

@@ -22,6 +22,12 @@ impl ToolState {
pub fn select_tool(&mut self, tool: ToolType) {
self.active_tool = tool
}
pub fn set_primary_color<T: Into<Color>>(&mut self, primary_color: T) {
self.primary_color = primary_color.into();
}
pub fn set_secondary_color<T: Into<Color>>(&mut self, secondary_color: T) {
self.secondary_color = secondary_color.into();
}
}
#[repr(usize)]