| 96 | } |
| 97 | |
| 98 | bool onMouseScroll(Event* event) |
| 99 | { |
| 100 | auto mouseEvent = static_cast<EventMouse*>(event); |
| 101 | float moveY = mouseEvent->getScrollY() * 20; |
| 102 | |
| 103 | auto minOffset = this->minContainerOffset(); |
| 104 | auto maxOffset = this->maxContainerOffset(); |
| 105 | |
| 106 | auto offset = this->getContentOffset(); |
| 107 | offset.y += moveY; |
| 108 | |
| 109 | if (offset.y < minOffset.y) |
| 110 | { |
| 111 | offset.y = minOffset.y; |
| 112 | } |
| 113 | else if (offset.y > maxOffset.y) |
| 114 | { |
| 115 | offset.y = maxOffset.y; |
| 116 | } |
| 117 | this->setContentOffset(offset); |
| 118 | |
| 119 | return true; |
| 120 | } |
| 121 | |
| 122 | protected: |
| 123 | TestCustomTableView() |
nothing calls this directly
no test coverage detected