More colors for shallow scripts and more steps

This commit is contained in:
2026-01-23 00:36:04 +01:00
parent 88b6f64a72
commit 1aad52eed1
5 changed files with 33 additions and 23 deletions

View File

@@ -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;