MCPcopy Create free account
hub / github.com/PolyMC/PolyMC / updateSelectionButton

Method updateSelectionButton

launcher/ui/pages/modplatform/ModPage.cpp:282–296  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

280
281
282void ModPage::updateSelectionButton()
283{
284 if (!isOpened || selectedVersion < 0) {
285 ui->modSelectionButton->setEnabled(false);
286 return;
287 }
288
289 ui->modSelectionButton->setEnabled(true);
290 auto& version = current.versions[selectedVersion];
291 if (!dialog->isModSelected(current.name, version.fileName)) {
292 ui->modSelectionButton->setText(tr("Select mod for download"));
293 } else {
294 ui->modSelectionButton->setText(tr("Deselect mod for download"));
295 }
296}
297
298void ModPage::updateUi()
299{

Callers

nothing calls this directly

Calls 3

setEnabledMethod · 0.80
isModSelectedMethod · 0.80
setTextMethod · 0.45

Tested by

no test coverage detected