| 115 | } |
| 116 | |
| 117 | void UpdateWidgetSize(WidgetID widget, Dimension &size, [[maybe_unused]] const Dimension &padding, [[maybe_unused]] Dimension &fill, [[maybe_unused]] Dimension &resize) override |
| 118 | { |
| 119 | switch (widget) { |
| 120 | case WID_EM_MESSAGE: { |
| 121 | this->height_summary = GetStringHeight(this->summary_msg.GetDecodedString(), size.width); |
| 122 | this->height_detailed = (this->detailed_msg.empty()) ? 0 : GetStringHeight(this->detailed_msg.GetDecodedString(), size.width); |
| 123 | this->height_extra = (this->extra_msg.empty()) ? 0 : GetStringHeight(this->extra_msg.GetDecodedString(), size.width); |
| 124 | |
| 125 | uint panel_height = this->height_summary; |
| 126 | if (!this->detailed_msg.empty()) panel_height += this->height_detailed + WidgetDimensions::scaled.vsep_wide; |
| 127 | if (!this->extra_msg.empty()) panel_height += this->height_extra + WidgetDimensions::scaled.vsep_wide; |
| 128 | |
| 129 | size.height = std::max(size.height, panel_height); |
| 130 | break; |
| 131 | } |
| 132 | case WID_EM_FACE: |
| 133 | size = maxdim(size, GetScaledSpriteSize(SPR_GRADIENT)); |
| 134 | break; |
| 135 | } |
| 136 | } |
| 137 | |
| 138 | Point OnInitialPosition([[maybe_unused]] int16_t sm_width, [[maybe_unused]] int16_t sm_height, [[maybe_unused]] int window_number) override |
| 139 | { |
nothing calls this directly
no test coverage detected