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

Function Item_TextScroll_MaxScroll

code/ui/ui_shared.cpp:7517–7530  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7515}
7516
7517int Item_TextScroll_MaxScroll ( itemDef_t *item )
7518{
7519 textScrollDef_t *scrollPtr = (textScrollDef_t*)item->typeData;
7520
7521 int count = scrollPtr->iLineCount;
7522 int max = count - (int)(item->window.rect.h / scrollPtr->lineHeight) + 1;
7523
7524 if (max < 0)
7525 {
7526 return 0;
7527 }
7528
7529 return max;
7530}
7531
7532int Item_TextScroll_ThumbPosition ( itemDef_t *item )
7533{

Callers 3

Calls

no outgoing calls

Tested by

no test coverage detected