|
|
|
|
1553
|
// - On edit screens, touch Up Half for -, Bottom Half to +
|
1553
|
// - On edit screens, touch Up Half for -, Bottom Half to +
|
1554
|
//
|
1554
|
//
|
1555
|
void MarlinUI::screen_click(const uint8_t row, const uint8_t col, const uint8_t, const uint8_t) {
|
1555
|
void MarlinUI::screen_click(const uint8_t row, const uint8_t col, const uint8_t, const uint8_t) {
|
|
|
1556
|
+ const millis_t now = millis();
|
|
|
1557
|
+ if (PENDING(now, next_button_update_ms)) return;
|
|
|
1558
|
+ next_button_update_ms = now + repeat_delay; // Assume the repeat delay
|
1556
|
const int8_t xdir = col < (LCD_WIDTH ) / 2 ? -1 : 1,
|
1559
|
const int8_t xdir = col < (LCD_WIDTH ) / 2 ? -1 : 1,
|
1557
|
ydir = row < (LCD_HEIGHT) / 2 ? -1 : 1;
|
1560
|
ydir = row < (LCD_HEIGHT) / 2 ? -1 : 1;
|
1558
|
if (on_edit_screen)
|
1561
|
if (on_edit_screen)
|
1559
|
encoderDiff = epps * ydir;
|
1562
|
encoderDiff = epps * ydir;
|
1560
|
else if (screen_items > 0) {
|
1563
|
else if (screen_items > 0) {
|
1561
|
- // Last 3 cols act as a scroll :-)
|
|
|
|
|
1564
|
+ // Last 5 cols act as a scroll :-)
|
1562
|
if (col > (LCD_WIDTH) - 5)
|
1565
|
if (col > (LCD_WIDTH) - 5)
|
1563
|
// 2 * LCD_HEIGHT to scroll to bottom of next page. (LCD_HEIGHT would only go 1 item down.)
|
1566
|
// 2 * LCD_HEIGHT to scroll to bottom of next page. (LCD_HEIGHT would only go 1 item down.)
|
1564
|
encoderDiff = epps * (encoderLine - encoderTopLine + 2 * (LCD_HEIGHT)) * ydir;
|
1567
|
encoderDiff = epps * (encoderLine - encoderTopLine + 2 * (LCD_HEIGHT)) * ydir;
|