From 8c28c210a6d37b82febbaae5d84729e84d8dc6cc Mon Sep 17 00:00:00 2001 From: Weird Constructor Date: Wed, 1 Sep 2021 18:56:27 +0200 Subject: [PATCH] assign default colors to the categories --- src/dsp/mod.rs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/dsp/mod.rs b/src/dsp/mod.rs index b6f65f3..82d3064 100644 --- a/src/dsp/mod.rs +++ b/src/dsp/mod.rs @@ -336,6 +336,20 @@ pub enum UICategory { 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: macro_rules! n_id { ($x: expr) => { $x } } macro_rules! d_id { ($x: expr) => { $x } }