mirror of
https://github.com/MultiMC/MultiMC5.git
synced 2024-11-20 08:10:11 +00:00
NOISSUE Disable 'Install Forge' button when game is running
This commit is contained in:
parent
60b686f014
commit
efa3bb33f5
@ -203,11 +203,11 @@ void VersionPage::updateVersionControls()
|
|||||||
{
|
{
|
||||||
// FIXME: this is a dirty hack
|
// FIXME: this is a dirty hack
|
||||||
auto minecraftVersion = Version(m_profile->getComponentVersion("net.minecraft"));
|
auto minecraftVersion = Version(m_profile->getComponentVersion("net.minecraft"));
|
||||||
bool newCraft = controlsEnabled && (minecraftVersion >= Version("1.14"));
|
bool newCraft = minecraftVersion >= Version("1.14");
|
||||||
bool oldCraft = controlsEnabled && (minecraftVersion <= Version("1.12.2"));
|
bool oldCraft = minecraftVersion <= Version("1.12.2");
|
||||||
ui->actionInstall_Fabric->setEnabled(newCraft);
|
ui->actionInstall_Fabric->setEnabled(controlsEnabled && newCraft);
|
||||||
ui->actionInstall_Forge->setEnabled(true);
|
ui->actionInstall_Forge->setEnabled(controlsEnabled);
|
||||||
ui->actionInstall_LiteLoader->setEnabled(oldCraft);
|
ui->actionInstall_LiteLoader->setEnabled(controlsEnabled && oldCraft);
|
||||||
ui->actionReload->setEnabled(true);
|
ui->actionReload->setEnabled(true);
|
||||||
updateButtons();
|
updateButtons();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user