添加一些 tooltip (#2215)
* 添加几个 FXUtils.installFastTooltip * add * add * add * 更新 VersionPage.java * add * add
This commit is contained in:
@@ -65,6 +65,7 @@ import java.util.regex.Pattern;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import static org.jackhuang.hmcl.setting.ConfigHolder.config;
|
||||
import static org.jackhuang.hmcl.ui.FXUtils.runInFX;
|
||||
import static org.jackhuang.hmcl.ui.FXUtils.newImage;
|
||||
import static org.jackhuang.hmcl.util.Logging.LOG;
|
||||
import static org.jackhuang.hmcl.util.Pair.pair;
|
||||
@@ -347,11 +348,13 @@ public class GameCrashWindow extends Stage {
|
||||
gameDir.getStyleClass().setAll("two-line-item-second-large");
|
||||
gameDir.setTitle(i18n("game.directory"));
|
||||
gameDir.setSubtitle(launchOptions.getGameDir().getAbsolutePath());
|
||||
runInFX(() -> FXUtils.installFastTooltip(gameDir, i18n("game.directory")));
|
||||
|
||||
TwoLineListItem javaDir = new TwoLineListItem();
|
||||
javaDir.getStyleClass().setAll("two-line-item-second-large");
|
||||
javaDir.setTitle(i18n("settings.game.java_directory"));
|
||||
javaDir.setSubtitle(launchOptions.getJava().getBinary().toAbsolutePath().toString());
|
||||
runInFX(() -> FXUtils.installFastTooltip(javaDir, i18n("settings.game.java_directory")));
|
||||
|
||||
Label reasonTitle = new Label(i18n("game.crash.reason"));
|
||||
reasonTitle.getStyleClass().add("two-line-item-second-large-title");
|
||||
|
||||
@@ -528,6 +528,7 @@ public class CreateAccountPane extends JFXDialogLayout implements DialogAware {
|
||||
|
||||
if (factory instanceof OfflineAccountFactory) {
|
||||
txtUsername.setPromptText(i18n("account.methods.offline.name.special_characters"));
|
||||
runInFX(() -> FXUtils.installFastTooltip(txtUsername, i18n("account.methods.offline.name.special_characters")));
|
||||
|
||||
JFXHyperlink purchaseLink = new JFXHyperlink(i18n("account.methods.yggdrasil.purchase"));
|
||||
purchaseLink.setExternalLink(YggdrasilService.PURCHASE_URL);
|
||||
|
||||
@@ -33,6 +33,7 @@ import org.jackhuang.hmcl.ui.decorator.DecoratorPage;
|
||||
import org.jackhuang.hmcl.ui.versions.VersionSettingsPage;
|
||||
|
||||
import static org.jackhuang.hmcl.ui.versions.VersionPage.wrap;
|
||||
import static org.jackhuang.hmcl.ui.FXUtils.runInFX;
|
||||
import static org.jackhuang.hmcl.util.i18n.I18n.i18n;
|
||||
|
||||
public class LauncherSettingsPage extends DecoratorAnimatedPage implements DecoratorPage, PageAware {
|
||||
@@ -72,6 +73,7 @@ public class LauncherSettingsPage extends DecoratorAnimatedPage implements Decor
|
||||
settingsItem.setTitle(i18n("settings.type.global.manage"));
|
||||
settingsItem.setLeftGraphic(wrap(SVG::gamepad));
|
||||
settingsItem.activeProperty().bind(tab.getSelectionModel().selectedItemProperty().isEqualTo(gameTab));
|
||||
runInFX(() -> FXUtils.installFastTooltip(settingsItem, i18n("settings.type.global.manage")));
|
||||
settingsItem.setOnAction(e -> tab.select(gameTab));
|
||||
})
|
||||
.startCategory(i18n("launcher"))
|
||||
|
||||
@@ -69,6 +69,7 @@ import java.util.stream.IntStream;
|
||||
|
||||
import static org.jackhuang.hmcl.setting.ConfigHolder.config;
|
||||
import static org.jackhuang.hmcl.ui.FXUtils.SINE;
|
||||
import static org.jackhuang.hmcl.ui.FXUtils.runInFX;
|
||||
import static org.jackhuang.hmcl.util.i18n.I18n.i18n;
|
||||
|
||||
public final class MainPage extends StackPane implements DecoratorPage {
|
||||
@@ -227,6 +228,7 @@ public final class MainPage extends StackPane implements DecoratorPage {
|
||||
StackPane.setAlignment(svg, Pos.CENTER_RIGHT);
|
||||
graphic.getChildren().setAll(svg);
|
||||
graphic.setTranslateX(12);
|
||||
runInFX(() -> FXUtils.installFastTooltip(menuButton, i18n("version.switch")));
|
||||
menuButton.setGraphic(graphic);
|
||||
|
||||
launchPane.getChildren().setAll(launchButton, separator, menuButton);
|
||||
|
||||
@@ -150,6 +150,7 @@ public class RootPage extends DecoratorAnimatedPage implements DecoratorPage {
|
||||
downloadItem.setActionButtonVisible(false);
|
||||
downloadItem.setTitle(i18n("download"));
|
||||
downloadItem.setOnAction(e -> Controllers.navigate(Controllers.getDownloadPage()));
|
||||
runInFX(() -> FXUtils.installFastTooltip(downloadItem, i18n("download.hint")));
|
||||
|
||||
// fifth item in left sidebar
|
||||
AdvancedListItem multiplayerItem = new AdvancedListItem();
|
||||
|
||||
@@ -65,6 +65,7 @@ import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
import static org.jackhuang.hmcl.util.i18n.I18n.i18n;
|
||||
import static org.jackhuang.hmcl.ui.FXUtils.runInFX;
|
||||
|
||||
public class DownloadPage extends Control implements DecoratorPage {
|
||||
private final ReadOnlyObjectWrapper<State> state = new ReadOnlyObjectWrapper<>();
|
||||
@@ -262,17 +263,20 @@ public class DownloadPage extends Control implements DecoratorPage {
|
||||
JFXHyperlink openMcmodButton = new JFXHyperlink(i18n("mods.mcmod"));
|
||||
openMcmodButton.setExternalLink(getSkinnable().translations.getMcmodUrl(getSkinnable().mod));
|
||||
descriptionPane.getChildren().add(openMcmodButton);
|
||||
runInFX(() -> FXUtils.installFastTooltip(openMcmodButton, i18n("mods.mcmod")));
|
||||
|
||||
if (StringUtils.isNotBlank(getSkinnable().mod.getMcbbs())) {
|
||||
JFXHyperlink openMcbbsButton = new JFXHyperlink(i18n("mods.mcbbs"));
|
||||
openMcbbsButton.setExternalLink(ModManager.getMcbbsUrl(getSkinnable().mod.getMcbbs()));
|
||||
descriptionPane.getChildren().add(openMcbbsButton);
|
||||
runInFX(() -> FXUtils.installFastTooltip(openMcbbsButton, i18n("mods.mcbbs")));
|
||||
}
|
||||
}
|
||||
|
||||
JFXHyperlink openUrlButton = new JFXHyperlink(control.page.getLocalizedOfficialPage());
|
||||
openUrlButton.setExternalLink(getSkinnable().addon.getPageUrl());
|
||||
descriptionPane.getChildren().add(openUrlButton);
|
||||
runInFX(() -> FXUtils.installFastTooltip(openUrlButton, control.page.getLocalizedOfficialPage()));
|
||||
}
|
||||
|
||||
{
|
||||
|
||||
@@ -92,6 +92,7 @@ public class GameListItemSkin extends SkinBase<GameListItem> {
|
||||
btnLaunch.getStyleClass().add("toggle-icon4");
|
||||
BorderPane.setAlignment(btnLaunch, Pos.CENTER);
|
||||
btnLaunch.setGraphic(FXUtils.limitingSize(SVG.rocketLaunchOutline(Theme.blackFillBinding(), 24, 24), 24, 24));
|
||||
runInFX(() -> FXUtils.installFastTooltip(btnLaunch, i18n("version.launch.test")));
|
||||
right.getChildren().add(btnLaunch);
|
||||
}
|
||||
|
||||
@@ -104,6 +105,7 @@ public class GameListItemSkin extends SkinBase<GameListItem> {
|
||||
btnManage.getStyleClass().add("toggle-icon4");
|
||||
BorderPane.setAlignment(btnManage, Pos.CENTER);
|
||||
btnManage.setGraphic(FXUtils.limitingSize(SVG.dotsVertical(Theme.blackFillBinding(), 24, 24), 24, 24));
|
||||
runInFX(() -> FXUtils.installFastTooltip(btnManage, i18n("settings.game.management")));
|
||||
right.getChildren().add(btnManage);
|
||||
}
|
||||
|
||||
|
||||
@@ -91,11 +91,13 @@ public class GameListPage extends DecoratorAnimatedPage implements DecoratorPage
|
||||
installNewGameItem.setTitle(i18n("install.new_game"));
|
||||
installNewGameItem.setLeftGraphic(VersionPage.wrap(SVG::plusCircleOutline));
|
||||
installNewGameItem.setOnAction(e -> Versions.addNewGame());
|
||||
runInFX(() -> FXUtils.installFastTooltip(installNewGameItem, i18n("install.new_game")));
|
||||
})
|
||||
.addNavigationDrawerItem(installModpackItem -> {
|
||||
installModpackItem.setTitle(i18n("install.modpack"));
|
||||
installModpackItem.setLeftGraphic(VersionPage.wrap(SVG::pack));
|
||||
installModpackItem.setOnAction(e -> Versions.importModpack());
|
||||
runInFX(() -> FXUtils.installFastTooltip(installModpackItem, i18n("install.modpack")));
|
||||
})
|
||||
.addNavigationDrawerItem(refreshItem -> {
|
||||
refreshItem.setTitle(i18n("button.refresh"));
|
||||
@@ -106,6 +108,7 @@ public class GameListPage extends DecoratorAnimatedPage implements DecoratorPage
|
||||
globalManageItem.setTitle(i18n("settings.type.global.manage"));
|
||||
globalManageItem.setLeftGraphic(VersionPage.wrap(SVG::gearOutline));
|
||||
globalManageItem.setOnAction(e -> modifyGlobalGameSettings());
|
||||
runInFX(() -> FXUtils.installFastTooltip(globalManageItem, i18n("settings.type.global.manage")));
|
||||
});
|
||||
FXUtils.setLimitHeight(bottomLeftCornerList, 40 * 4 + 12 * 2);
|
||||
setLeft(pane, bottomLeftCornerList);
|
||||
|
||||
@@ -239,6 +239,7 @@ public class VersionPage extends DecoratorAnimatedPage implements DecoratorPage
|
||||
versionSettingsItem.setLeftGraphic(wrap(SVG::gearOutline));
|
||||
versionSettingsItem.setActionButtonVisible(false);
|
||||
versionSettingsItem.activeProperty().bind(control.tab.getSelectionModel().selectedItemProperty().isEqualTo(control.versionSettingsTab));
|
||||
runInFX(() -> FXUtils.installFastTooltip(versionSettingsItem, i18n("settings.game")));
|
||||
versionSettingsItem.setOnAction(e -> control.tab.select(control.versionSettingsTab));
|
||||
|
||||
AdvancedListItem modListItem = new AdvancedListItem();
|
||||
@@ -247,6 +248,7 @@ public class VersionPage extends DecoratorAnimatedPage implements DecoratorPage
|
||||
modListItem.setLeftGraphic(wrap(SVG::puzzle));
|
||||
modListItem.setActionButtonVisible(false);
|
||||
modListItem.activeProperty().bind(control.tab.getSelectionModel().selectedItemProperty().isEqualTo(control.modListTab));
|
||||
runInFX(() -> FXUtils.installFastTooltip(modListItem, i18n("mods.manage")));
|
||||
modListItem.setOnAction(e -> control.tab.select(control.modListTab));
|
||||
|
||||
AdvancedListItem installerListItem = new AdvancedListItem();
|
||||
@@ -255,6 +257,7 @@ public class VersionPage extends DecoratorAnimatedPage implements DecoratorPage
|
||||
installerListItem.setLeftGraphic(wrap(SVG::cube));
|
||||
installerListItem.setActionButtonVisible(false);
|
||||
installerListItem.activeProperty().bind(control.tab.getSelectionModel().selectedItemProperty().isEqualTo(control.installerListTab));
|
||||
runInFX(() -> FXUtils.installFastTooltip(installerListItem, i18n("settings.tabs.installers")));
|
||||
installerListItem.setOnAction(e -> control.tab.select(control.installerListTab));
|
||||
|
||||
AdvancedListItem worldListItem = new AdvancedListItem();
|
||||
@@ -263,6 +266,7 @@ public class VersionPage extends DecoratorAnimatedPage implements DecoratorPage
|
||||
worldListItem.setLeftGraphic(wrap(SVG::earth));
|
||||
worldListItem.setActionButtonVisible(false);
|
||||
worldListItem.activeProperty().bind(control.tab.getSelectionModel().selectedItemProperty().isEqualTo(control.worldListTab));
|
||||
runInFX(() -> FXUtils.installFastTooltip(worldListItem, i18n("world.manage")));
|
||||
worldListItem.setOnAction(e -> control.tab.select(control.worldListTab));
|
||||
|
||||
AdvancedListBox sideBar = new AdvancedListBox()
|
||||
|
||||
@@ -306,6 +306,7 @@ curse.sort.popularity=Popularity
|
||||
curse.sort.total_downloads=Total Downloads
|
||||
|
||||
download=Download
|
||||
download.hint=Install games and modpacks or download mods, resource packs and maps
|
||||
download.code.404=File not found on the remote server: %s
|
||||
download.content=Addons
|
||||
download.curseforge.customization=Light and shadow, and game customization
|
||||
@@ -1156,6 +1157,7 @@ version.game.snapshot=Snapshot
|
||||
version.game.snapshots=Snapshots
|
||||
version.launch=Launch Game
|
||||
version.launch.test=Test Launch
|
||||
version.switch=Switch version
|
||||
version.launch_script=Export Launch Script
|
||||
version.launch_script.failed=Unable to export launch script.
|
||||
version.launch_script.save=Export Launch Script
|
||||
|
||||
@@ -291,6 +291,7 @@ curse.sort.popularity=Popularidad
|
||||
curse.sort.total_downloads=Descargas totales
|
||||
|
||||
download=Descargar
|
||||
download.hint=Instalar juegos y modpacks o descargar mods, paquetes de recursos y mapas
|
||||
download.code.404=Archivo no encontrado en el servidor remoto: %s
|
||||
download.content=Complementos
|
||||
download.curseforge.customization=Luz y sombras, y personalización del juego
|
||||
@@ -1052,6 +1053,7 @@ version.game.snapshot=Snapshot
|
||||
version.game.snapshots=Snapshots
|
||||
version.launch=Iniciar Minecraft
|
||||
version.launch.test=Probar instalación
|
||||
version.switch=Cambiar versión
|
||||
version.launch_script=Exportar script de ejecución
|
||||
version.launch_script.failed=No se ha podido exportar el script de ejecución.
|
||||
version.launch_script.save=Exportar script de ejecución
|
||||
|
||||
@@ -273,6 +273,7 @@ curse.sort.popularity=人気
|
||||
curse.sort.total_downloads=合計ダウンロード数
|
||||
|
||||
download=ダウンロード
|
||||
download.hint=ゲームや modpack をインストールするか、mod、リソース パック、マップをダウンロードします
|
||||
download.code.404=リモートサーバーにファイルが見つかりません:%s
|
||||
download.content=ゲームコンテンツ
|
||||
download.curseforge.customization=光と影、およびゲームのカスタマイズ
|
||||
@@ -882,6 +883,7 @@ version.game.snapshot=スナップショット
|
||||
version.game.snapshots=Snapshots
|
||||
version.launch=プレイ
|
||||
version.launch.test=テストプレイ
|
||||
version.switch=バージョンを切り替える
|
||||
version.launch_script=起動スクリプトを作成する
|
||||
version.launch_script.failed=起動スクリプトを作成できません。
|
||||
version.launch_script.save=起動スクリプトを保存する
|
||||
|
||||
@@ -275,6 +275,7 @@ curse.sort.popularity=Популярность
|
||||
curse.sort.total_downloads=Всего скачиваний
|
||||
|
||||
download=Скачать
|
||||
download.hint=Установите игры и пакеты модов или загрузите моды, пакеты ресурсов и карты
|
||||
download.code.404=Файл не найден на удалённом сервере: %s
|
||||
download.content=Игровой контент
|
||||
download.curseforge.customization=Свет и тень, а также настройка игры
|
||||
@@ -888,6 +889,7 @@ version.game.snapshot=Снапшот
|
||||
version.game.snapshots=Снапшоты
|
||||
version.launch=Играть
|
||||
version.launch.test=Тестовая игра
|
||||
version.switch=Сменить версию
|
||||
version.launch_script=Создать сценарий запуска
|
||||
version.launch_script.failed=Невозможно выполнить сценарий запуска.
|
||||
version.launch_script.save=Сохранить сценарий запуска
|
||||
|
||||
@@ -315,6 +315,7 @@ curse.sort.popularity=熱度
|
||||
curse.sort.total_downloads=下載量
|
||||
|
||||
download=下載
|
||||
download.hint=安裝遊戲和整合包或下載模組、資源包和地圖
|
||||
download.code.404=遠端伺服器沒有需要下載的檔案: %s
|
||||
download.content=遊戲內容
|
||||
download.curseforge.customization=光影與遊戲定制
|
||||
@@ -1022,6 +1023,7 @@ version.game.snapshot=測試版本
|
||||
version.game.snapshots=測試版本
|
||||
version.launch=啟動遊戲
|
||||
version.launch.test=測試遊戲
|
||||
version.switch=切換版本
|
||||
version.launch_script=生成啟動指令碼
|
||||
version.launch_script.failed=生成啟動指令碼失敗
|
||||
version.launch_script.save=儲存啟動指令碼
|
||||
|
||||
@@ -314,6 +314,7 @@ curse.sort.popularity=热度
|
||||
curse.sort.total_downloads=下载量
|
||||
|
||||
download=下载
|
||||
download.hint=安装游戏和整合包或下载模组、资源包和地图
|
||||
download.code.404=远程服务器不包含需要下载的文件: %s
|
||||
download.content=游戏内容
|
||||
download.curseforge.customization=光影与游戏定制
|
||||
@@ -970,7 +971,7 @@ settings.type.global.manage=全局游戏设置
|
||||
settings.type.global.edit=编辑全局版本设置
|
||||
settings.type.special.enable=启用游戏特定设置(不影响其他游戏版本)
|
||||
settings.type.special.edit=编辑游戏特定设置
|
||||
settings.type.special.edit.hint=当前游戏版本 [%s] 启用了游戏特定设置,因此本页面选项不对该游戏生效。点击链接前往该游戏版本的游戏特定设置页
|
||||
settings.type.special.edit.hint=当前游戏版本 %s 启用了游戏特定设置,因此本页面选项不对该游戏生效。点击链接前往该游戏版本的游戏特定设置页
|
||||
|
||||
sponsor=赞助
|
||||
sponsor.bmclapi=国内下载源由 BMCLAPI 和我的世界中文论坛 (MCBBS) 提供高速下载服务。BMCLAPI 为公益服务,赞助 BMCLAPI 可以帮助作者更好的提供稳定高速的下载服务,[点击此处查阅详细信息]
|
||||
@@ -1020,6 +1021,7 @@ version.game.snapshot=测试版
|
||||
version.game.snapshots=测试版
|
||||
version.launch=启动游戏
|
||||
version.launch.test=测试游戏
|
||||
version.switch=切换版本
|
||||
version.launch_script=生成启动脚本
|
||||
version.launch_script.failed=生成启动脚本失败
|
||||
version.launch_script.save=保存启动脚本
|
||||
|
||||
Reference in New Issue
Block a user