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.
This commit is contained in:
Daniel Thompson 2020-03-13 19:02:29 +00:00
parent 321484b845
commit 5a234c16ad
2 changed files with 3 additions and 3 deletions

View file

@ -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)."""

View file

@ -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