From 988f6bed1ed1f4f7fe3ecb9b749442e311855ffd Mon Sep 17 00:00:00 2001 From: Angel Jumbo Date: Sat, 14 Jan 2023 00:11:24 -0500 Subject: [PATCH] increase or decrease the rim with shift+i and shift+d (I just can't sleep, help) --- lavat.c | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/lavat.c b/lavat.c index 94c23fd..08b8365 100644 --- a/lavat.c +++ b/lavat.c @@ -185,7 +185,6 @@ void event_handler(){ } break; case 'i': - case 'I': if(radiusIn+10<=150){ radiusIn+=10; radius = (radiusIn * radiusIn + (float)(maxX * maxY)) / 15000; @@ -193,13 +192,31 @@ void event_handler(){ } break; case 'd': - case 'D': if(radiusIn-10>=50){ radiusIn-=10; radius = (radiusIn * radiusIn + (float)(maxX * maxY)) / 15000; margin = contained ? radius * 10 : 0; } break; + case 'I': + + if (color != TB_DEFAULT || custom) + if(rim+1<=5){ + rim++; + sumConst2 = sumConst * (1 + (float)(0.25 * rim)); + + } + break; + case 'D': + + if (color != TB_DEFAULT || custom) + if(rim-1>=0){ + rim--; + sumConst2 = sumConst * (1 + (float)(0.25 * rim)); + + } + break; + case 'q': case 'Q': tb_shutdown(); @@ -350,6 +367,8 @@ void print_help() { " If you use Kitty or Alacritty you must use it " "with the -k option to see the rim.\n" + " Increase and decrease the rim in runtime with " + "shift+i and shift+d." " -k Set the color of the rim if there is one." " Available colours: red, blue, yellow, green, cyan and magenta. \n" " -b Set the number of metaballs in the simulation, "