MCPcopy Create free account
hub / github.com/JACoders/OpenJK / Scroll_TextScroll_AutoFunc

Function Scroll_TextScroll_AutoFunc

code/ui/ui_shared.cpp:9924–9945  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

9922}
9923
9924static void Scroll_TextScroll_AutoFunc (void *p)
9925{
9926 scrollInfo_t *si = (scrollInfo_t*)p;
9927
9928 if (DC->realTime > si->nextScrollTime)
9929 {
9930 // need to scroll which is done by simulating a click to the item
9931 // this is done a bit sideways as the autoscroll "knows" that the item is a listbox
9932 // so it calls it directly
9933 Item_TextScroll_HandleKey(si->item, si->scrollKey, qtrue, qfalse);
9934 si->nextScrollTime = DC->realTime + si->adjustValue;
9935 }
9936
9937 if (DC->realTime > si->nextAdjustTime)
9938 {
9939 si->nextAdjustTime = DC->realTime + SCROLL_TIME_ADJUST;
9940 if (si->adjustValue > SCROLL_TIME_FLOOR)
9941 {
9942 si->adjustValue -= SCROLL_TIME_ADJUSTOFFSET;
9943 }
9944 }
9945}
9946
9947static void Scroll_TextScroll_ThumbFunc(void *p)
9948{

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected