create 3 functions for your modes. then 3 buttons each calling different function.
no need for if-else thing

i'm not quite sure you read and understood the workshop. what's the point of just reading it? try doing it, try it with your small examples. otherwise you'll ask alot of this kinds of questions which i hear, you already do...



Ubi bene, ibi Patria.