| 393 | } |
| 394 | |
| 395 | void OnClick([[maybe_unused]] Point pt, WidgetID widget, [[maybe_unused]] int click_count) override |
| 396 | { |
| 397 | if (widget != WID_SLT_BACKGROUND) return; |
| 398 | |
| 399 | auto *wid = this->GetWidget<NWidgetResizeBase>(WID_SLT_BACKGROUND); |
| 400 | int index = (pt.y - WidgetDimensions::scaled.framerect.top - wid->pos_y - this->header_height) / this->line_height; |
| 401 | if (index >= 0 && static_cast<uint>(index) < this->rows.size()) { |
| 402 | const LeagueTableElement *lte = this->rows[index].second; |
| 403 | HandleLinkClick(lte->link); |
| 404 | } |
| 405 | } |
| 406 | |
| 407 | /** |
| 408 | * Some data on this window has become invalid. |
nothing calls this directly
no test coverage detected