| 30 | WidgetDimensions WidgetDimensions::scaled = {}; |
| 31 | |
| 32 | static std::string GetStringForWidget(const Window *w, const NWidgetCore *nwid, bool secondary = false) |
| 33 | { |
| 34 | StringID stringid = nwid->GetString(); |
| 35 | if (nwid->GetIndex() < 0) { |
| 36 | if (stringid == STR_NULL) return {}; |
| 37 | |
| 38 | return GetString(stringid + (secondary ? 1 : 0)); |
| 39 | } |
| 40 | |
| 41 | return w->GetWidgetString(nwid->GetIndex(), stringid + (secondary ? 1 : 0)); |
| 42 | } |
| 43 | |
| 44 | /** |
| 45 | * Scale a RectPadding to GUI zoom level. |
no test coverage detected