User Tools

Site Tools


Adding Code Comments To Gestures

Since GML is built on the XML “[W3c]” standard syntax in order to add comments to your GML simply wrap the text in “!–” and “–” tags. As shown below:

<Gesture id="n-drag" type="drag">
<!-- The 'n-drag' gesture can be activated by any number of touch points between 1 and 10. When a touch down is recognized on a touch object the position of the touch point is tracked. This change in the position of the touch point is mapped directly to the position of the touch object. -->
                    <   cluster point_number="0" point_number_min="1" point_number_max="10"/>
        <algorithm class="kinemetric" type="continuous">
            <library module="drag"/>
                <property id="drag_dx" result="dx"/>
                <property id="drag_dy" result="dy"/>
        <update dispatch_type="continuous">
            <gesture_event  type="drag">
                <property ref="drag_dx" target="x"/>
                <property ref="drag_dy" target="y"/>

Comment tags are not treated in the same way as other tags in most parsers. As long as the text contents of the comment tags do not contain the characters “–” it will be “ignored” by the parser.

adding_code_comments_to_gestures.txt · Last modified: 2019/01/29 19:06 (external edit)