sweetbean.extension.TouchButton
TouchButton
A class to create touch buttons as input instead of key presses (https://github.com/jspsych/jspsych-contrib/tree/main/packages/extension-touchscreen-buttons)
Source code in sweetbean/extension/TouchButton.py
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 |
|
__init__(key, layout)
Parameters:
Name | Type | Description | Default |
---|---|---|---|
key
|
the key that is emulated by the touch button |
required | |
layout
|
the layout of the touch button |
required |
Source code in sweetbean/extension/TouchButton.py
12 13 14 15 16 17 18 19 |
|
bottom_left(color=None)
classmethod
Convenience Function to create a touch button on the bottom left side of the screen
Source code in sweetbean/extension/TouchButton.py
48 49 50 51 52 53 54 55 56 57 |
|
bottom_right(color=None)
classmethod
Convenience Function to create a touch button on the bottom right side of the screen
Source code in sweetbean/extension/TouchButton.py
59 60 61 62 63 64 65 66 67 68 |
|
left(color=None)
classmethod
Convenience Function to create a touch button on the left side of the screen
Source code in sweetbean/extension/TouchButton.py
30 31 32 33 34 35 36 37 |
|
right(color=None)
classmethod
Convenience Function to create a touch button on the right side of the screen
Source code in sweetbean/extension/TouchButton.py
39 40 41 42 43 44 45 46 |
|
top_left(color=None)
classmethod
Convenience Function to create a touch button on the top left side of the screen
Source code in sweetbean/extension/TouchButton.py
70 71 72 73 74 75 76 77 |
|
top_right(color=None)
classmethod
Convenience Function to create a touch button on the top right side of the screen
Source code in sweetbean/extension/TouchButton.py
79 80 81 82 83 84 85 86 |
|