mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-06 19:56:42 +01:00
add PgUp/PgDown in sequencer
This commit is contained in:
parent
359afb2e8c
commit
eccb355815
3 changed files with 17 additions and 10 deletions
|
|
@ -2,19 +2,19 @@ use crate::*;
|
|||
|
||||
macro_rules! impl_axis_common { ($A:ident $T:ty) => {
|
||||
impl $A<$T> {
|
||||
pub fn start_inc (&mut self) -> $T {
|
||||
#[inline] pub fn start_inc (&mut self) -> $T {
|
||||
self.start += 1;
|
||||
self.start
|
||||
}
|
||||
pub fn start_dec (&mut self) -> $T {
|
||||
#[inline] pub fn start_dec (&mut self) -> $T {
|
||||
self.start = self.start.saturating_sub(1);
|
||||
self.start
|
||||
}
|
||||
pub fn point_inc (&mut self) -> Option<$T> {
|
||||
#[inline] pub fn point_inc (&mut self) -> Option<$T> {
|
||||
self.point = self.point.map(|p|p + 1);
|
||||
self.point
|
||||
}
|
||||
pub fn point_dec (&mut self) -> Option<$T> {
|
||||
#[inline] pub fn point_dec (&mut self) -> Option<$T> {
|
||||
self.point = self.point.map(|p|p.saturating_sub(1));
|
||||
self.point
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue