main/buttons.c

branch
novnc
changeset 38
537ffe280775
parent 19
49e2960d4642
child 41
7639cfa6aec0
equal deleted inserted replaced
37:1b82a6d50a39 38:537ffe280775
6 #include "config.h" 6 #include "config.h"
7 7
8 8
9 sButton Buttons[MAXBUTTONS]; ///< 40 buttons on a screen. 9 sButton Buttons[MAXBUTTONS]; ///< 40 buttons on a screen.
10 int level = 1; ///< Keyboard level. 10 int level = 1; ///< Keyboard level.
11
12 extern uint8_t VNC_pointer_button; ///< Mouse buttons mask
13 extern uint16_t VNC_pointer_x; ///< Mouse coordinate X
14 extern uint16_t VNC_pointer_y; ///< Mouse coordinate Y
15 11
16 const char *mashTypes[] = { "Infusion", "Temperature", "Decoction" }; 12 const char *mashTypes[] = { "Infusion", "Temperature", "Decoction" };
17 const char *SSR2Types[] = { "Uit", "HLT of MLT", "HLT en MLT", "Idle" }; 13 const char *SSR2Types[] = { "Uit", "HLT of MLT", "HLT en MLT", "Idle" };
18 14
19 15
136 t_pressed = false; 132 t_pressed = false;
137 ox = oy = -1; 133 ox = oy = -1;
138 return rc; 134 return rc;
139 } 135 }
140 136
141 if (VNC_pointer_button & 0x07) { 137 if (v_pressed) {
142 v_pressed = true;
143 vx = VNC_pointer_x;
144 vy = VNC_pointer_y;
145 return -1;
146 } else if (v_pressed) {
147 rc = Buttons_Search(vx, vy); 138 rc = Buttons_Search(vx, vy);
148 v_pressed = false; 139 v_pressed = false;
149 vx = vy = -1; 140 vx = vy = -1;
150 return rc; 141 return rc;
151 } 142 }

mercurial