summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Thompson <daniel@redfelineninja.org.uk>2020-03-13 19:02:29 (GMT)
committerDaniel Thompson <daniel@redfelineninja.org.uk>2020-03-13 19:02:29 (GMT)
commit5a234c16ada5319228fd2231957ca64d2c9141f8 (patch)
treec7279e0e60810fa7a5ffb94b208b80f778d6ce3f
parent321484b845e18471950585302737f9a1a9119c40 (diff)
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.
-rw-r--r--wasp/apps/testapp.py2
-rw-r--r--wasp/manager.py4
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