Feat: UI / UX improvements once more (mouse)
Some checks failed
CI / check (ubuntu-latest, x86_64-unknown-linux-gnu) (push) Successful in 10m3s
Deploy Website / deploy (push) Has been skipped
CI / check (macos-14, aarch64-apple-darwin) (push) Has been cancelled
CI / check (windows-latest, x86_64-pc-windows-msvc) (push) Has been cancelled
Some checks failed
CI / check (ubuntu-latest, x86_64-unknown-linux-gnu) (push) Successful in 10m3s
Deploy Website / deploy (push) Has been skipped
CI / check (macos-14, aarch64-apple-darwin) (push) Has been cancelled
CI / check (windows-latest, x86_64-pc-windows-msvc) (push) Has been cancelled
This commit is contained in:
@@ -17,6 +17,40 @@ impl CyclicEnum for MainLayout {
|
||||
const VARIANTS: &'static [Self] = &[Self::Top, Self::Bottom, Self::Left, Self::Right];
|
||||
}
|
||||
|
||||
#[derive(Clone, Copy, PartialEq, Eq, Default)]
|
||||
pub enum ScopeMode {
|
||||
#[default]
|
||||
Line,
|
||||
Filled,
|
||||
}
|
||||
|
||||
impl ScopeMode {
|
||||
pub fn toggle(self) -> Self {
|
||||
match self {
|
||||
Self::Line => Self::Filled,
|
||||
Self::Filled => Self::Line,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Clone, Copy, PartialEq, Eq, Default)]
|
||||
pub enum SpectrumMode {
|
||||
#[default]
|
||||
Bars,
|
||||
Line,
|
||||
Filled,
|
||||
}
|
||||
|
||||
impl SpectrumMode {
|
||||
pub fn cycle(self) -> Self {
|
||||
match self {
|
||||
Self::Bars => Self::Line,
|
||||
Self::Line => Self::Filled,
|
||||
Self::Filled => Self::Bars,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Clone, Copy, PartialEq, Eq, Default)]
|
||||
pub enum RefreshRate {
|
||||
#[default]
|
||||
@@ -88,6 +122,11 @@ pub struct AudioConfig {
|
||||
pub gain_boost: f32,
|
||||
pub normalize_viz: bool,
|
||||
pub layout: MainLayout,
|
||||
pub scope_mode: ScopeMode,
|
||||
pub scope_vertical: bool,
|
||||
pub lissajous_trails: bool,
|
||||
pub spectrum_mode: SpectrumMode,
|
||||
pub spectrum_peaks: bool,
|
||||
}
|
||||
|
||||
impl Default for AudioConfig {
|
||||
@@ -110,6 +149,11 @@ impl Default for AudioConfig {
|
||||
gain_boost: 1.0,
|
||||
normalize_viz: false,
|
||||
layout: MainLayout::default(),
|
||||
scope_mode: ScopeMode::default(),
|
||||
scope_vertical: false,
|
||||
lissajous_trails: false,
|
||||
spectrum_mode: SpectrumMode::default(),
|
||||
spectrum_peaks: false,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user