| 413 | } |
| 414 | |
| 415 | void UpdateSettingsPanelSize(Dimension &size) |
| 416 | { |
| 417 | uint width = 0; |
| 418 | for (const auto &desc : this->sandbox_settings) { |
| 419 | const IntSettingDesc *sd = desc->AsIntSetting(); |
| 420 | |
| 421 | auto [param1, param2] = sd->GetValueParams(sd->GetDefaultValue()); |
| 422 | width = std::max(width, GetStringBoundingBox(GetString(sd->GetTitle(), STR_CONFIG_SETTING_VALUE, param1, param2)).width); |
| 423 | } |
| 424 | |
| 425 | size.width = width + WidgetDimensions::scaled.hsep_wide * 2 + SETTING_BUTTON_WIDTH; |
| 426 | size.height = this->line_height * static_cast<uint>(std::size(this->sandbox_settings)); |
| 427 | } |
| 428 | |
| 429 | void OnClick([[maybe_unused]] Point pt, WidgetID widget, [[maybe_unused]] int click_count) override |
| 430 | { |
nothing calls this directly
no test coverage detected