assign default colors to the categories

This commit is contained in:
Weird Constructor 2021-09-01 18:56:27 +02:00
parent 425caaf654
commit 8c28c210a6

View file

@ -336,6 +336,20 @@ pub enum UICategory {
IOUtil, IOUtil,
} }
impl UICategory {
pub fn default_color_idx(&self) -> u8 {
match self {
UICategory::None => 17,
UICategory::Osc => 0,
UICategory::Mod => 7,
UICategory::NtoM => 4,
UICategory::Signal => 2,
UICategory::Ctrl => 12,
UICategory::IOUtil => 10,
}
}
}
// The following macros define normalize/denormalize functions: // The following macros define normalize/denormalize functions:
macro_rules! n_id { ($x: expr) => { $x } } macro_rules! n_id { ($x: expr) => { $x } }
macro_rules! d_id { ($x: expr) => { $x } } macro_rules! d_id { ($x: expr) => { $x } }