MCPcopy Create free account
hub / github.com/MultiMC/Launcher / updateVersionControls

Method updateVersionControls

launcher/ui/pages/instance/VersionPage.cpp:210–223  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

208}
209
210void VersionPage::updateVersionControls()
211{
212 // FIXME: this is a dirty hack
213 auto minecraftVersion = Version(m_profile->getComponentVersion("net.minecraft"));
214
215 bool supportsFabric = minecraftVersion >= Version("1.14");
216 ui->actionInstall_Fabric->setEnabled(controlsEnabled && supportsFabric);
217 ui->actionInstall_Quilt->setEnabled((controlsEnabled) && supportsFabric);
218
219 bool supportsLiteLoader = minecraftVersion <= Version("1.12.2");
220 ui->actionInstall_LiteLoader->setEnabled(controlsEnabled && supportsLiteLoader);
221
222 updateButtons();
223}
224
225void VersionPage::updateButtons(int row)
226{

Callers

nothing calls this directly

Calls 3

getComponentVersionMethod · 0.80
setEnabledMethod · 0.80
VersionClass · 0.50

Tested by

no test coverage detected