| 369 | } |
| 370 | |
| 371 | void ScrollBar::OnMouseMoveRelative(vector2i_t relativePosition){ |
| 372 | if(pressed){ |
| 373 | scrollBar.pos.y = relativePosition.y - pressOffset; |
| 374 | if(scrollBar.pos.y + scrollBar.size.y > height) scrollBar.pos.y = height - scrollBar.size.y; |
| 375 | if(scrollBar.pos.y < 0) scrollBar.pos.y = 0; |
| 376 | scrollPos = scrollBar.pos.y * scrollIncrement; |
| 377 | } |
| 378 | } |
| 379 | |
| 380 | void ScrollBarHorizontal::ResetScrollBar(int displayWidth, int areaWidth){ |
| 381 | double scrollDisplayRange = ((double)areaWidth) / displayWidth; // Essentially how many 'displayHeight's in areaHeight |
no outgoing calls
no test coverage detected