///////////////////// Scroll Bar /////////////////////
| 345 | // Scroll Bar |
| 346 | ////////////////////////// |
| 347 | void ScrollBar::ResetScrollBar(int displayHeight, int areaHeight){ |
| 348 | double scrollDisplayRange = ((double)areaHeight) / displayHeight; // Essentially how many 'displayHeight's in areaHeight |
| 349 | scrollIncrement = ceil(scrollDisplayRange); |
| 350 | scrollBar.size.y = displayHeight / scrollDisplayRange; |
| 351 | scrollBar.pos.y = 0; |
| 352 | scrollPos = 0; |
| 353 | height = displayHeight; |
| 354 | } |
| 355 | |
| 356 | void ScrollBar::Paint(surface_t* surface, vector2i_t offset, int width){ |
| 357 | Graphics::DrawRect(offset.x, offset.y, width, height, 128, 128, 128, surface); |
no test coverage detected