| 447 | static constexpr int MIN_ELEMENTS = 5; ///< smallest number of elements to display |
| 448 | |
| 449 | FramerateWindow(WindowDesc &desc, WindowNumber number) : Window(desc) |
| 450 | { |
| 451 | this->InitNested(number); |
| 452 | this->UpdateData(); |
| 453 | this->num_displayed = this->num_active; |
| 454 | |
| 455 | /* Window is always initialised to MIN_ELEMENTS height, resize to contain num_displayed */ |
| 456 | ResizeWindow(this, 0, (std::max(MIN_ELEMENTS, this->num_displayed) - MIN_ELEMENTS) * GetCharacterHeight(FS_NORMAL)); |
| 457 | } |
| 458 | |
| 459 | /** Update the window on a regular interval. */ |
| 460 | const IntervalTimer<TimerWindow> update_interval = {std::chrono::milliseconds(100), [this](auto) { |
nothing calls this directly
no test coverage detected