Add tooltip about what would be cleaned in game directory

This commit is contained in:
huanghongxun 2018-12-22 00:25:19 +08:00
parent 97e90de71e
commit 631056064a
5 changed files with 10 additions and 1 deletions

View File

@ -18,6 +18,7 @@
package org.jackhuang.hmcl.ui.construct;
import javafx.scene.Node;
import org.jackhuang.hmcl.ui.FXUtils;
public class IconedMenuItem extends IconedItem {
@ -27,4 +28,9 @@ public class IconedMenuItem extends IconedItem {
getStyleClass().setAll("iconed-menu-item");
setOnMouseClicked(e -> action.run());
}
public IconedMenuItem addTooltip(String tooltip) {
FXUtils.installTooltip(this, tooltip);
return this;
}
}

View File

@ -98,7 +98,7 @@ public final class VersionPage extends StackPane implements DecoratorPage {
new IconedMenuItem(null, i18n("version.manage.remove"), FXUtils.withJFXPopupClosing(() -> Versions.deleteVersion(profile, version), managementPopup)),
new IconedMenuItem(null, i18n("version.manage.redownload_assets_index"), FXUtils.withJFXPopupClosing(() -> Versions.updateGameAssets(profile, version), managementPopup)),
new IconedMenuItem(null, i18n("version.manage.remove_libraries"), FXUtils.withJFXPopupClosing(() -> FileUtils.deleteDirectoryQuietly(new File(profile.getRepository().getBaseDirectory(), "libraries")), managementPopup)),
new IconedMenuItem(null, i18n("version.manage.clean"), FXUtils.withJFXPopupClosing(() -> Versions.cleanVersion(profile, version), managementPopup))
new IconedMenuItem(null, i18n("version.manage.clean"), FXUtils.withJFXPopupClosing(() -> Versions.cleanVersion(profile, version), managementPopup)).addTooltip(i18n("version.manage.clean.tooltip"))
);
FXUtils.installTooltip(btnDelete, i18n("version.manage.remove"));

View File

@ -393,6 +393,7 @@ version.launch_script.save=Save the launch script
version.launch_script.success=Finished script creation, %s.
version.manage=Game List
version.manage.clean=Clean game directory
version.manage.clean.tooltip=Clean logs, crash-reports
version.manage.manage=Manage Game
version.manage.redownload_assets_index=Update Game Asset Files
version.manage.remove=Delete this game

View File

@ -392,6 +392,7 @@ version.launch_script.save=儲存啟動腳本
version.launch_script.success=啟動腳本已生成完畢:%s
version.manage=遊戲列表
version.manage.clean=清理遊戲目錄
version.manage.clean.tooltip=清理 logs, crash-reports
version.manage.manage=游戏管理
version.manage.redownload_assets_index=更新遊戲資源檔案
version.manage.remove=刪除該版本

View File

@ -392,6 +392,7 @@ version.launch_script.save=保存启动脚本
version.launch_script.success=启动脚本已生成完毕:%s
version.manage=游戏列表
version.manage.clean=清理游戏目录
version.manage.clean.tooltip=清理 logs, crash-reports
version.manage.manage=游戏管理
version.manage.redownload_assets_index=更新游戏资源文件
version.manage.remove=删除该版本