Skip to content

Commit

Permalink
Updated code.
Browse files Browse the repository at this point in the history
  • Loading branch information
Guy Chronister committed Dec 2, 2024
1 parent dc66bd3 commit 8a2d821
Showing 1 changed file with 2 additions and 15 deletions.
17 changes: 2 additions & 15 deletions neothesia-core/src/render/guidelines.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ use crate::{
render::{QuadInstance, QuadPipeline},
render::text::{TextInstance, TextPipeline}, // Move to text module
utils::Point,
piano_layout::{Key, KeyboardLayout},
};

pub struct GuidelineRenderer {
Expand Down Expand Up @@ -51,7 +52,7 @@ impl GuidelineRenderer {

/// Reupload instances to GPU
fn reupload(&mut self) {
if !self.vertical_guidelines {
if (!self.vertical_guidelines) {
return;
}

Expand Down Expand Up @@ -179,17 +180,3 @@ impl GuidelineRenderer {
}
}

impl KeyboardLayout {
pub fn white_keys(&self) -> impl Iterator<Item = &Key> {
self.keys.iter().filter(|k| !k.is_black())
}

pub fn black_keys(&self) -> impl Iterator<Item = &Key> {
self.keys.iter().filter(|k| k.is_black())
}

pub fn height(&self) -> f32 {
self.height
}
}

0 comments on commit 8a2d821

Please sign in to comment.