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

Function Item_TextScroll_ThumbDrawPosition

code/ui/ui_shared.cpp:7554–7572  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7552}
7553
7554int Item_TextScroll_ThumbDrawPosition ( itemDef_t *item )
7555{
7556 int min, max;
7557
7558 if (itemCapture == item)
7559 {
7560 min = item->window.rect.y + SCROLLBAR_SIZE + 1;
7561 max = item->window.rect.y + item->window.rect.h - 2*SCROLLBAR_SIZE - 1;
7562
7563 if (DC->cursory >= min + SCROLLBAR_SIZE/2 && DC->cursory <= max + SCROLLBAR_SIZE/2)
7564 {
7565 return DC->cursory - SCROLLBAR_SIZE/2;
7566 }
7567
7568 return Item_TextScroll_ThumbPosition(item);
7569 }
7570
7571 return Item_TextScroll_ThumbPosition(item);
7572}
7573
7574int Item_TextScroll_OverLB ( itemDef_t *item, float x, float y )
7575{

Callers 1

Item_TextScroll_PaintFunction · 0.70

Calls 1

Tested by

no test coverage detected