Skip to content

微软账号皮肤相关修改 #3858

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 41 commits into
base: main
Choose a base branch
from
Open

微软账号皮肤相关修改 #3858

wants to merge 41 commits into from

Conversation

CiiLu
Copy link
Contributor

@CiiLu CiiLu commented Apr 25, 2025

Close #3486
Close #3633
Close #3410

内容:

  • 微软账户皮肤增加3D预览
  • 支持修改披风
  • 皮肤上传增加模型选择

PixPin_2025-04-26_14-33-21

c61ae93531df95712fc91446622112be

@Wulian233
Copy link
Contributor

需要至少实现简中和英语的翻译

> Task :checkTranslations FAILED
I18N.properties missing key 'account.skin.upload'
FAILURE: Build failed with an exception.
I18N.properties missing key 'account.skin.select_model'

I18N.properties missing key 'account.cape.none'
* What went wrong:
I18N.properties missing key 'account.cape.change'
Execution failed for task ':checkTranslations'.
I18N_zh.properties missing key 'account.cape.none'
> Part of the translation is missing
I18N_zh.properties missing key 'account.cape.change'

@3gf8jv4dv
Copy link
Contributor

需要至少实现简中和英语的翻译

I18N_zh.properties 是繁体中文。此外构建时要求简繁英都要有对应翻译。

@3gf8jv4dv
Copy link
Contributor

考虑为披风名添加翻译吗?

@CiiLu
Copy link
Contributor Author

CiiLu commented Apr 26, 2025

考虑为披风名添加翻译吗?

如果这个 PR 被合并,后续会在独立 PR 中添加翻译

@burningtnt
Copy link
Member

若要加入披风选择功能,应直接在启动器内加入数个披风的贴图以允许玩家可视化地选择披风

@CiiLu
Copy link
Contributor Author

CiiLu commented May 1, 2025

图片
翻译(来自 Minecraft Wiki)+预览(选中)

@CiiLu CiiLu marked this pull request as ready for review May 1, 2025 01:54
@@ -0,0 +1,203 @@
/*
* Hello Minecraft! Launcher
* Copyright (C) 2021 huangyuhui <[email protected]> and contributors
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
* Copyright (C) 2021 huangyuhui <huanghongxun2008@126.com> and contributors
* Copyright (C) 2025 huangyuhui <huanghongxun2008@126.com> and contributors

无关紧要的小建议~

Copy link
Member

Choose a reason for hiding this comment

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

不应更新版权信息年份

@zkitefly
Copy link
Member

zkitefly commented May 1, 2025

image

感觉这个页面非常空,或许可以将披风选择的选择页面搬到前面而不需要跳转至二级页面

@zkitefly
Copy link
Member

zkitefly commented May 9, 2025

image

来自群友反馈,披风太多会顶窗口

@Wulian233
Copy link
Contributor

Wulian233 commented May 9, 2025

之前的2019十周年金色苦力怕披风和Pan都是基岩版独占的,最近同步java了。还有普通披风,登录基岩版获得,还需要同步一下翻译

Copy link
Contributor

@3gf8jv4dv 3gf8jv4dv left a comment

Choose a reason for hiding this comment

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

可供选择的披风选项现在看起来像是居中,且会受到右侧披风图像加载与否的影响(转圈时/呈现图像时文本会跳动)。

Copy link
Member

@burningtnt burningtnt left a comment

Choose a reason for hiding this comment

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

image

标题“皮肤”略有不妥,可改为“皮肤与披风”;右侧的空白有些奇怪

image

应当在此界面提供取消、重选文件和皮肤预览功能(即在左侧渲染对应皮肤)

image

异常的对齐。此外,右侧的图片在加载过程中高度为 0,因此会出现对话框高度抖动,请通过设置图片的 prefHeight 来解决

public Task<?> uploadSkin() {
if (account instanceof OfflineAccount) {
Controllers.dialog(new OfflineAccountSkinPane((OfflineAccount) account));
return null;
return Task.runAsync(Schedulers.javafx(), () -> {
Copy link
Member

Choose a reason for hiding this comment

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

质疑此处分别对 OfflineAccount 和 MicrosoftAccount 处理,会增加耦合性。如果可能,请使用面向对象的思维处理不同账户类型的操作。

} catch (ResourceNotFoundError error) {
previewCapeImage = FXUtils.newRemoteImage(capeItem.getSelectedData().getUrl());
}
previewCapeImage = scaleImageNearestNeighbor(previewCapeImage, 10, 10);
Copy link
Member

@burningtnt burningtnt Jun 7, 2025

Choose a reason for hiding this comment

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

你在重复造轮子 :( 请使用 JavaFX 的 ImageView 来转换图片大小

@@ -0,0 +1,203 @@
/*
* Hello Minecraft! Launcher
* Copyright (C) 2021 huangyuhui <[email protected]> and contributors
Copy link
Member

Choose a reason for hiding this comment

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

不应更新版权信息年份

}

public static class MinecraftProfileResponseCape {
String id;
Copy link
Member

@burningtnt burningtnt Jun 7, 2025

Choose a reason for hiding this comment

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

用于 Gson 序列化的字段应当标记为 private final

String id;
String state;
String url;
String variant; // CLASSIC, SLIM
Copy link
Member

Choose a reason for hiding this comment

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

既然这是一个 Enum,则应当使用对应的 Enum 作为类型。同样,请标记为 private final

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
5 participants