mirror of
https://github.com/HMCL-dev/HMCL.git
synced 2025-09-13 13:56:55 -04:00
Render supported mod loader in org.jackhuang.hmcl.ui.versions.DownloadPage.ModItem. Support #2284 (#2296)
This commit is contained in:
parent
9549819571
commit
cf61abcf03
@ -35,6 +35,7 @@ import javafx.scene.image.Image;
|
||||
import javafx.scene.image.ImageView;
|
||||
import javafx.scene.layout.*;
|
||||
import javafx.stage.FileChooser;
|
||||
import org.jackhuang.hmcl.mod.ModLoaderType;
|
||||
import org.jackhuang.hmcl.mod.ModManager;
|
||||
import org.jackhuang.hmcl.mod.RemoteMod;
|
||||
import org.jackhuang.hmcl.mod.RemoteModRepository;
|
||||
@ -409,6 +410,23 @@ public class DownloadPage extends Control implements DecoratorPage {
|
||||
break;
|
||||
}
|
||||
|
||||
for (ModLoaderType modLoaderType : dataItem.getLoaders()) {
|
||||
switch (modLoaderType) {
|
||||
case FORGE:
|
||||
graphicPane.getChildren().setAll(SVG.releaseCircleOutline(Theme.blackFillBinding(), 24, 24));
|
||||
content.getTags().add(i18n("install.installer.forge"));
|
||||
break;
|
||||
case FABRIC:
|
||||
graphicPane.getChildren().setAll(SVG.releaseCircleOutline(Theme.blackFillBinding(), 24, 24));
|
||||
content.getTags().add(i18n("install.installer.fabric"));
|
||||
break;
|
||||
case LITE_LOADER:
|
||||
graphicPane.getChildren().setAll(SVG.releaseCircleOutline(Theme.blackFillBinding(), 24, 24));
|
||||
content.getTags().add(i18n("install.installer.liteloader"));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// Workaround for https://github.com/huanghongxun/HMCL/issues/2129
|
||||
this.setMinHeight(50);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user