Skip to content

Commit

Permalink
Fix rather unfortunate typo
Browse files Browse the repository at this point in the history
One person was spelling gesture correctly, another wasn't. It was completely missed due to screen readers, and now we must rerun the CI one more time because otherwise the documentation and the real class won't be in sync.
  • Loading branch information
samtupy committed Oct 10, 2024
1 parent a49d9bd commit a00e141
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
// Example:
#include"touch.nvgt"
#include"speech.nvgt"
touch_jesture_manager touch;
touch_gesture_manager touch;
void main() {
show_window("touch screen test");
//attach multiple keys to a single jesture.
//attach multiple keys to a single gesture.
int[] t = {KEY_TAB, KEY_LSHIFT};
touch_keyboard_interface testsim(touch, {{"swipe_left1f", KEY_LEFT}, {"swipe_right1f", KEY_RIGHT}, {"swipe_up1f", KEY_UP}, {"swipe_down1f", KEY_DOWN}, {"double_tap1f", KEY_RETURN}, {"tripple_tap1f", t}, {"swipe_left2f", KEY_ESCAPE}, {"swipe_right2f", KEY_Q}, {"double_tap2f", KEY_SPACE}});
touch.add_touch_interface(testsim);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
*/

// Example:
touch_jesture_manager touch;
touch_gesture_manager touch;
void main() {
wait(1000); // Give the user some time to touch the screen to make sure it appears.
if (!touch.is_available()) alert("warning", "This system does not appear to support touch screen devices");
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# touch_keyboard_interface
Convert gesture events to simulated keyboard input.

`touch_keyboard_interface(touch_jesture_manager@parent, dictionary@map, float minx = TOUCH_UNCOORDINATED, float maxx = TOUCH_UNCOORDINATED, float miny = TOUCH_UNCOORDINATED, float maxy = TOUCH_UNCOORDINATED);`
`touch_keyboard_interface(touch_gesture_manager@parent, dictionary@map, float minx = TOUCH_UNCOORDINATED, float maxx = TOUCH_UNCOORDINATED, float miny = TOUCH_UNCOORDINATED, float maxy = TOUCH_UNCOORDINATED);`

## Arguments:
* touch_gesture_manager@ parent: A handle to the manager you intend to add this interface to, parameter subject for removal in future.
Expand Down
10 changes: 5 additions & 5 deletions release/include/touch.nvgt
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ enum swipe_touch_directions {
funcdef void tap_func(touch_screen_finger@finger);
const float TOUCH_UNCOORDINATED = -10.0f;
class touch_interface {
touch_jesture_manager@parent;
touch_gesture_manager@parent;
float minx, maxx, miny, maxy;
bool coordinated = false;
touch_interface(touch_jesture_manager@parent, float minx = TOUCH_UNCOORDINATED, float maxx = TOUCH_UNCOORDINATED, float miny = TOUCH_UNCOORDINATED, float maxy = TOUCH_UNCOORDINATED) {
touch_interface(touch_gesture_manager@parent, float minx = TOUCH_UNCOORDINATED, float maxx = TOUCH_UNCOORDINATED, float miny = TOUCH_UNCOORDINATED, float maxy = TOUCH_UNCOORDINATED) {
@this.parent = parent;
this.minx = minx;
this.maxx = maxx;
Expand Down Expand Up @@ -52,7 +52,7 @@ class touch_interface {
}
class touch_keyboard_interface: touch_interface {
dictionary keymap;
touch_keyboard_interface(touch_jesture_manager@parent, dictionary@map, float minx = TOUCH_UNCOORDINATED, float maxx = TOUCH_UNCOORDINATED, float miny = TOUCH_UNCOORDINATED, float maxy = TOUCH_UNCOORDINATED) {
touch_keyboard_interface(touch_gesture_manager@parent, dictionary@map, float minx = TOUCH_UNCOORDINATED, float maxx = TOUCH_UNCOORDINATED, float miny = TOUCH_UNCOORDINATED, float maxy = TOUCH_UNCOORDINATED) {
super(parent, minx, maxx, miny, maxy);
this.keymap = map;
}
Expand Down Expand Up @@ -114,7 +114,7 @@ class touch_keyboard_interface: touch_interface {
}
}
}
class touch_jesture_manager {
class touch_gesture_manager {
tap_func@last_tap_func;
bool no_touch = true;
timer input_timer, tap_timer;
Expand All @@ -125,7 +125,7 @@ class touch_jesture_manager {
touch_interface@[] interfaces;
touch_screen_finger@last_tapped_finger;
timer updatetimer;
touch_jesture_manager() {
touch_gesture_manager() {
}
bool is_available() {
uint64[]@ dev = get_touch_devices();
Expand Down

0 comments on commit a00e141

Please sign in to comment.