From 5a234c16ada5319228fd2231957ca64d2c9141f8 Mon Sep 17 00:00:00 2001 From: Daniel Thompson Date: Fri, 13 Mar 2020 19:02:29 +0000 Subject: [PATCH] wasp: Rotate the swipe UI by 90 degrees This is something of an experiment but now the app roll is traversed using horizontal swipes and applications should primarily use vertical swipes to navigate internally. This is mostly because if "feels" better but it also leaves the vertical scrolling hardware available for use by the app. --- wasp/apps/testapp.py | 2 +- wasp/manager.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/wasp/apps/testapp.py b/wasp/apps/testapp.py index 9f512f1..0ab33a3 100644 --- a/wasp/apps/testapp.py +++ b/wasp/apps/testapp.py @@ -15,7 +15,7 @@ class TestApp(): """Activate the application.""" self.on_screen = ( -1, -1, -1, -1, -1, -1 ) self.draw(effect) - system.request_event(manager.EVENT_TOUCH | manager.EVENT_SWIPE_LEFTRIGHT) + system.request_event(manager.EVENT_TOUCH | manager.EVENT_SWIPE_UPDOWN) def background(self): """De-activate the application (without losing state).""" diff --git a/wasp/manager.py b/wasp/manager.py index 3dafebe..055b7d1 100644 --- a/wasp/manager.py +++ b/wasp/manager.py @@ -55,12 +55,12 @@ class Manager(object): """ app_list = self.applications - if direction == DOWN: + if direction == LEFT: i = app_list.index(self.app) + 1 if i >= len(app_list): i = 0 self.switch(app_list[i]) - elif direction == UP: + elif direction == RIGHT: i = app_list.index(self.app) - 1 if i < 0: i = len(app_list)-1