| 234 | } |
| 235 | |
| 236 | void GetEffectsDialog::AddLoadingErrorPage() { |
| 237 | wxPanel* page = safenew wxPanel(); |
| 238 | page->Hide(); |
| 239 | page->Create(m_treebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxBORDER_NONE); |
| 240 | |
| 241 | wxBoxSizer* sizer = safenew wxBoxSizer(wxVERTICAL); |
| 242 | |
| 243 | page->SetSizer(sizer); |
| 244 | sizer->AddSpacer(20); |
| 245 | |
| 246 | wxStaticText* title = safenew wxStaticText(page, wxID_ANY, connectionErrorTitleText.Translation()); |
| 247 | wxFont font = title->GetFont().MakeLarger().MakeBold(); |
| 248 | title->SetFont(font); |
| 249 | |
| 250 | wxStaticText* description = safenew wxStaticText(page, wxID_ANY, connectionErrorDescriptionText.Translation()); |
| 251 | description->Wrap(550); |
| 252 | |
| 253 | GradientButton* button = safenew GradientButton(page, wxID_ANY, tryAgainText.Translation(), wxDefaultPosition, wxSize(getEffectButtonWidth, getEffectButtonHeight)); |
| 254 | button->SetNormalColor(musehubButtonNormal); |
| 255 | button->SetPressedColor(musehubButtonPressed); |
| 256 | button->Bind(wxEVT_BUTTON, [this](auto) { |
| 257 | ReloadEffectList(); |
| 258 | }); |
| 259 | |
| 260 | sizer->Add(title, 0, wxALL, 10); |
| 261 | sizer->Add(description, 0, wxALL, 10); |
| 262 | sizer->Add(button, 0, wxALL, 10); |
| 263 | |
| 264 | m_treebook->AddPage(page, loadingPluginsTabText.Translation()); |
| 265 | } |
| 266 | |
| 267 | // Wraps the label to the given width and, if it exceeds two lines, |
| 268 | // collapses the overflow into a single right-elided second line. |
nothing calls this directly
no test coverage detected