Gestures

From HSYCO
Revision as of 16:46, 16 November 2018 by Gionatan (talk | contribs)
Jump to navigation Jump to search

Each page of type page or menu, can have multiple gestures assigned. This is done through pages (of menu and page types) can have multiple custom gestures assigned. This is done through the gestures attribute on the Project Editor, which adds a meta to the source code.

There are six different types of gestures available:


Name Description Default value
Gesture icon swipeup.png swipeup swipe towards the top of the screen off
Gesture icon swipedown.png swipedown swipe towards the bottom of the screen page:menu
Gesture icon swipeleft.png swipeleft swipe towards the left side of the screen page:forward
Gesture icon swiperight.png swiperight swipe towards the right side of the screen page:back
Gesture icon pinchin.png pinchin drag two fingers together off
Gesture icon pinchout.png pinchin drag two fingers apart off

Each gesture can have one of the following values:

Name Description
off no gesture assigned
user completing the gesture will produce a user call with name "gesture" and param "<type of gesture>/<page id (without page:)". E.g. param:"swipeleft/menu"
page:<page id> navigate to the specified page id
page:back navigate to previous page in history
page:forward navigate to next page in history


Syntax

Gesture meta tags follow a page declaration (menu) or (page). Gestures are specified with semicolon-separated list of <gesture type>=<value>.

(#gestures <gesture type>=<value>; <gesture type>=<value> ... )

E.g.

(menu#portrait)
(#gestures swipedown=off; swipeup=page:cameras; pinchin=user)
...