From fff06404696bb8790901cdefe016cd8d0fe856cb Mon Sep 17 00:00:00 2001 From: Bad Diode Date: Fri, 25 Aug 2023 15:42:58 +0200 Subject: Add pattern chain buttons behaviour (toggle/clear/random) --- src/globals.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'src/globals.c') diff --git a/src/globals.c b/src/globals.c index 7361129..05c964a 100644 --- a/src/globals.c +++ b/src/globals.c @@ -57,7 +57,7 @@ bool clear_screen = true; #define NOTIF_START_Y 12 #define PARAMS_W 166 -#define PARAMS_H 52 +#define PARAMS_H 56 #define PARAMS_START_X 29 #define PARAMS_START_Y 20 #define PARAMS_BOX_W 30 @@ -99,7 +99,7 @@ bool clear_screen = true; #define PAT_TRIG_W 14 #define PAT_TRIG_H 14 #define PAT_TRIG_START_X 32 -#define PAT_TRIG_START_Y 30 +#define PAT_TRIG_START_Y 37 #define PAT_TRIG_OFFSET_X (PAT_TRIG_W + 7) #define PAT_TRIG_OFFSET_Y (PAT_TRIG_H + 8) @@ -167,8 +167,15 @@ typedef struct Chain { u8 len; u8 current; u8 playing; + u8 enabled; } Chain; +typedef enum ChainButtons { + CHAIN_BTN_ENABLE = 16, + CHAIN_BTN_CLEAR = 17, + CHAIN_BTN_RANDOM = 18, +} ChainButtons; + static Chain chain = {0}; typedef enum Prob { -- cgit v1.2.1