Skip to content

优化没有可启动的游戏时的提示#4697

Merged
Glavo merged 2 commits intoHMCL-dev:mainfrom
Glavo:no-game
Oct 22, 2025
Merged

优化没有可启动的游戏时的提示#4697
Glavo merged 2 commits intoHMCL-dev:mainfrom
Glavo:no-game

Conversation

@Glavo
Copy link
Copy Markdown
Member

@Glavo Glavo commented Oct 18, 2025

image

Copilot AI review requested due to automatic review settings October 18, 2025 13:41
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR optimizes the message displayed when there are no launchable games available. The main goal is to improve user experience by providing clearer guidance and better interaction options when attempting to launch a game with no available instances.

Key changes:

  • Updated message text across all language files to be more concise and user-friendly
  • Modified the dialog implementation to use a confirmation dialog with custom buttons instead of a simple error dialog
  • Added a new translation key for the "Go to Download Page" button

Reviewed Changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
I18N_zh_CN.properties Updated Chinese (Simplified) translations with shorter, clearer message and new button text
I18N_zh.properties Updated Chinese (Traditional) translations with shorter, clearer message and new button text
I18N_uk.properties Removed outdated Ukrainian translation for the launch message
I18N_ru.properties Removed outdated Russian translation for the launch message
I18N_lzh.properties Removed outdated Classical Chinese translation for the launch message
I18N_ja.properties Removed outdated Japanese translation for the launch message
I18N_es.properties Removed outdated Spanish translation for the launch message
I18N.properties Updated English translations with shorter, clearer message and new button text
Versions.java Replaced simple error dialog with confirmation dialog featuring custom "Go to Download Page" button

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment on lines +225 to +232
JFXButton gotoDownload = new JFXButton(i18n("version.empty.launch.goto_download"));
gotoDownload.getStyleClass().add("dialog-accept");
gotoDownload.setOnAction(e -> Controllers.navigate(Controllers.getDownloadPage()));

Controllers.confirmAction(i18n("version.empty.launch"), i18n("launch.failed"),
MessageDialogPane.MessageType.ERROR,
gotoDownload,
null);
Copy link

Copilot AI Oct 18, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] The button creation and configuration could be extracted into a helper method or use a builder pattern to improve code organization and reusability.

Copilot uses AI. Check for mistakes.
Co-authored-by: 3gf8jv4dv <3gf8jv4dv@gmail.com>
@burningtnt
Copy link
Copy Markdown
Member

为什么不直接让 HMCL 下载最新 MC 版本并启动

@Glavo
Copy link
Copy Markdown
Member Author

Glavo commented Oct 22, 2025

为什么不直接让 HMCL 下载最新 MC 版本并启动

联机需要考虑双方版本号一致,我觉得引导用户自行挑选游戏版本更好。

@Glavo Glavo merged commit 7fbc99f into HMCL-dev:main Oct 22, 2025
2 checks passed
@Glavo Glavo deleted the no-game branch October 22, 2025 12:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants