Select the specific game version when clicking the 'download' button on ModListPage
This commit is contained in:
1 parent
8efaf9d9e7
commit
f681f71425
3 files changed
+7
-2
No files matched your search
@@ -236,8 +236,9 @@ public class DownloadPage extends DecoratorAnimatedPage implements DecoratorPage
|
||||
tab.select(modpackTab);
|
||||
}
|
||||
|
||||
public void showModDownloads() {
|
||||
public DownloadListPage showModDownloads() {
|
||||
tab.select(modTab);
|
||||
return modTab.getNode();
|
||||
}
|
||||
|
||||
public void showWorldDownloads() {
|
||||
|
||||
@@ -156,6 +156,10 @@ public class DownloadListPage extends Control implements DecoratorPage, VersionP
|
||||
this.loading.set(loading);
|
||||
}
|
||||
|
||||
public void selectVersion(String versionID) {
|
||||
FXUtils.runInFX(() -> selectedVersion.set(versionID));
|
||||
}
|
||||
|
||||
public void search(String userGameVersion, RemoteModRepository.Category category, int pageOffset, String searchFilter, RemoteModRepository.SortType sort) {
|
||||
retrySearch = null;
|
||||
setLoading(true);
|
||||
|
||||
@@ -210,7 +210,7 @@ public final class ModListPage extends ListPageBase<ModListPageSkin.ModInfoObjec
|
||||
}
|
||||
|
||||
public void download() {
|
||||
Controllers.getDownloadPage().showModDownloads();
|
||||
Controllers.getDownloadPage().showModDownloads().selectVersion(versionId);
|
||||
Controllers.navigate(Controllers.getDownloadPage());
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user