More colors for shallow scripts and more steps
This commit is contained in:
14
src/app.rs
14
src/app.rs
@@ -148,12 +148,7 @@ impl App {
|
||||
|
||||
pub fn step_up(&mut self) {
|
||||
let len = self.current_edit_pattern().length;
|
||||
let num_rows = match len {
|
||||
0..=8 => 1,
|
||||
9..=16 => 2,
|
||||
17..=24 => 3,
|
||||
_ => 4,
|
||||
};
|
||||
let num_rows = len.div_ceil(8);
|
||||
let steps_per_row = len.div_ceil(num_rows);
|
||||
|
||||
if self.editor_ctx.step >= steps_per_row {
|
||||
@@ -166,12 +161,7 @@ impl App {
|
||||
|
||||
pub fn step_down(&mut self) {
|
||||
let len = self.current_edit_pattern().length;
|
||||
let num_rows = match len {
|
||||
0..=8 => 1,
|
||||
9..=16 => 2,
|
||||
17..=24 => 3,
|
||||
_ => 4,
|
||||
};
|
||||
let num_rows = len.div_ceil(8);
|
||||
let steps_per_row = len.div_ceil(num_rows);
|
||||
|
||||
self.editor_ctx.step = (self.editor_ctx.step + steps_per_row) % len;
|
||||
|
||||
Reference in New Issue
Block a user