From b712ef626a1d142b615a9af09d6fdc14c471bbae Mon Sep 17 00:00:00 2001 From: equa Date: Sat, 24 Apr 2021 18:55:31 -0500 Subject: slightly better tab controls --- lib/transition.fnl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/transition.fnl b/lib/transition.fnl index e48411d..137789a 100644 --- a/lib/transition.fnl +++ b/lib/transition.fnl @@ -96,8 +96,10 @@ (if (and (. boxes self.type) (> self.tab 0)) ((. boxes self.type self.tab :action) self) (set self.transition true))) - (when (and (= key :tab) (. boxes self.type)) + (when (and (or (= key :tab) (= key :right)) (. boxes self.type)) (set self.tab (+ (% self.tab (length (. boxes self.type))) 1))) + (when (and (= key :left) (. boxes self.type)) + (set self.tab (+ (% (- self.tab 2) (length (. boxes self.type))) 1))) ) (fn mousepressed [self x y button] -- cgit 1.3.0-6-gf8a5