+ if (joykeyX > 0 && highlightedWidget->type == WG_JOYPAD)
+ {
+ waitForButton = true;
+ waitForKey = false;
+ allowJoypad = true;
+
+ if (*highlightedWidget->value > -1000)
+ {
+ *highlightedWidget->value = (-1000 - *highlightedWidget->value);
+ }
+
+ clearInput();
+ }
+
+ if (joykeyX < 0 && highlightedWidget->type == WG_JOYPAD)
+ {
+ if (waitForButton)
+ {
+ lastButtonPressed = -1;
+ *highlightedWidget->value = abs(*highlightedWidget->value) - 1000;
+ }
+ else
+ {
+ lastButtonPressed = -2;
+ *highlightedWidget->value = -2;
+ }
+
+ waitForButton = false;
+ allowJoypad = false;
+ highlightedWidget->redraw();
+ clearInput();
+ }
+