Difference between revisions of "Gestures"

From HSYCO
Jump to navigation Jump to search
Line 10: Line 10:
 
!Description
 
!Description
 
!
 
!
 +
!Default value
 
|-
 
|-
 
|swipeup
 
|swipeup
 
|swipe towards the top of the screen
 
|swipe towards the top of the screen
 
|[[File:Gesture icon swipeup.png|40px]]
 
|[[File:Gesture icon swipeup.png|40px]]
 +
|off
 
|-
 
|-
 
|swipedown
 
|swipedown
 
|swipe towards the bottom of the screen
 
|swipe towards the bottom of the screen
 
|[[File:Gesture icon swipedown.png|40px]]
 
|[[File:Gesture icon swipedown.png|40px]]
 +
|page:menu
 
|-
 
|-
 
|swipeleft
 
|swipeleft
 
|swipe towards the left side of the screen
 
|swipe towards the left side of the screen
 
|[[File:Gesture icon swipeleft.png|40px]]
 
|[[File:Gesture icon swipeleft.png|40px]]
 +
|page:forward
 
|-
 
|-
 
|swiperight
 
|swiperight
 
|swipe towards the right side of the screen
 
|swipe towards the right side of the screen
 
|[[File:Gesture icon swiperight.png|40px]]
 
|[[File:Gesture icon swiperight.png|40px]]
 +
|page:back
 
|-
 
|-
 
|pinchin
 
|pinchin
 
|drag two fingers together
 
|drag two fingers together
 
|[[File:Gesture icon pinchin.png|40px]]
 
|[[File:Gesture icon pinchin.png|40px]]
 +
|off
 
|-
 
|-
 
|pinchin
 
|pinchin
 
|drag two fingers apart
 
|drag two fingers apart
 +
|off
 
|[[File:Gesture icon pinchout.png|40px]]
 
|[[File:Gesture icon pinchout.png|40px]]
 
|-
 
|-
 
}
 
}
  
 +
Each gesture can have one of the following values:
  
 +
{| class="wikitable"
 +
!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 ===
 +
(menu) defines the beginning of the page. Orientation is specified as (menu#landscape) or (menu#portrait) when the project is orientation-enabled.
 +
(endofmenu) defines the end of the page.
 +
(menu[#<orientation>])
 +
...
 +
(endofmenu)
 +
E.g.
 +
(menu)
 +
...
 +
(endofmenu)
 +
 +
(menu#portrait)
 +
...
 +
(endofmenu)
  
 
(menu#portrait)
 
(menu#portrait)
 
(#gestures swipeup=off; pinchin=user; swipeleft=page:back; pinchout=page:u)
 
(#gestures swipeup=off; pinchin=user; swipeleft=page:back; pinchout=page:u)

Revision as of 16:36, 16 November 2018

Each page of type page or menu, can have multiple gestures assigned. This is done through pages (of page and menu 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:


} Each gesture can have one of the following values:
Name Description Default value
swipeup swipe towards the top of the screen Gesture icon swipeup.png off
swipedown swipe towards the bottom of the screen Gesture icon swipedown.png page:menu
swipeleft swipe towards the left side of the screen Gesture icon swipeleft.png page:forward
swiperight swipe towards the right side of the screen Gesture icon swiperight.png page:back
pinchin drag two fingers together Gesture icon pinchin.png off
pinchin drag two fingers apart off Gesture icon pinchout.png
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

(menu) defines the beginning of the page. Orientation is specified as (menu#landscape) or (menu#portrait) when the project is orientation-enabled. (endofmenu) defines the end of the page.

(menu[#<orientation>])
...
(endofmenu)

E.g.

(menu)
...
(endofmenu)

(menu#portrait)
...
(endofmenu)

(menu#portrait) (#gestures swipeup=off; pinchin=user; swipeleft=page:back; pinchout=page:u)