| 1836 | } |
| 1837 | |
| 1838 | bool OnTooltip([[maybe_unused]] Point pt, WidgetID widget, TooltipCloseCondition close_cond) override |
| 1839 | { |
| 1840 | switch (widget) { |
| 1841 | case WID_CL_MATRIX: { |
| 1842 | auto it = this->vscroll->GetScrolledItemFromWidget(this->buttons, pt.y, this, WID_CL_MATRIX); |
| 1843 | if (it == std::end(this->buttons)) break; |
| 1844 | |
| 1845 | Rect r = this->GetWidget<NWidgetBase>(WID_CL_MATRIX)->GetCurrentRect().Shrink(WidgetDimensions::scaled.framerect); |
| 1846 | auto tooltip = (*it)->GetTooltip(r, pt); |
| 1847 | if (!tooltip.has_value()) break; |
| 1848 | |
| 1849 | GuiShowTooltips(this, std::move(*tooltip), close_cond); |
| 1850 | return true; |
| 1851 | }; |
| 1852 | } |
| 1853 | |
| 1854 | return false; |
| 1855 | } |
| 1856 | |
| 1857 | void OnDropdownClose(Point pt, WidgetID widget, int index, int click_result, bool instant_close) override |
| 1858 | { |
nothing calls this directly
no test coverage detected