================= Scroll_ListBox_AutoFunc ================= */
| 10483 | ================= |
| 10484 | */ |
| 10485 | static void Scroll_ListBox_AutoFunc(void *p) |
| 10486 | { |
| 10487 | scrollInfo_t *si = (scrollInfo_t*)p; |
| 10488 | if (DC->realTime > si->nextScrollTime) |
| 10489 | { |
| 10490 | // need to scroll which is done by simulating a click to the item |
| 10491 | // this is done a bit sideways as the autoscroll "knows" that the item is a listbox |
| 10492 | // so it calls it directly |
| 10493 | Item_ListBox_HandleKey(si->item, si->scrollKey, qtrue, qfalse); |
| 10494 | si->nextScrollTime = DC->realTime + si->adjustValue; |
| 10495 | } |
| 10496 | |
| 10497 | if (DC->realTime > si->nextAdjustTime) |
| 10498 | { |
| 10499 | si->nextAdjustTime = DC->realTime + SCROLL_TIME_ADJUST; |
| 10500 | if (si->adjustValue > SCROLL_TIME_FLOOR) |
| 10501 | { |
| 10502 | si->adjustValue -= SCROLL_TIME_ADJUSTOFFSET; |
| 10503 | } |
| 10504 | } |
| 10505 | } |
| 10506 | |
| 10507 | /* |
| 10508 | ================= |
nothing calls this directly
no test coverage detected