| 616 | } |
| 617 | |
| 618 | void PickerWindow::EnsureSelectedClassIsVisible() |
| 619 | { |
| 620 | if (!this->has_class_picker) return; |
| 621 | if (this->classes.empty()) return; |
| 622 | |
| 623 | auto it = std::ranges::find(this->classes, this->callbacks.GetSelectedClass()); |
| 624 | if (it == std::end(this->classes)) return; |
| 625 | |
| 626 | int pos = static_cast<int>(std::distance(std::begin(this->classes), it)); |
| 627 | this->GetScrollbar(WID_PW_CLASS_SCROLL)->ScrollTowards(pos); |
| 628 | } |
| 629 | |
| 630 | void PickerWindow::RefreshUsedTypeList() |
| 631 | { |
no test coverage detected