Repository navigation
refactor: 皮肤管理 - #6037
refactor: 皮肤管理#6037CiiLu wants to merge 48 commits into
Conversation
|
左测边栏只有一个「皮肤」和一个「保存」,看起来显得空荡荡的。但我暂时想不出更好的设计。 有计划把披风拆分到另一个页面么? 此外不知道目前的皮肤渲染器,是否支持渲染披风的鞘翅形态。我看 Prism Launcher 里有个对应的选项。 |
不支持
微软账户还好,但是外置账户和离线账户披风是用户自己选择的,不知道怎么设计 |
我也这么觉得 🤔 |
|
要不把这个页面做成类似衣柜的形式。 目前「本地皮肤图片文件」的文件选择器,在 Windows 上似乎没有记忆功能,每次点开都在「此电脑」,切皮肤/披风的步骤略繁琐。如果能做成衣柜形式,那么大伙可以预先添加一批皮肤/披风到衣柜,要切换的时候直接在衣柜里应用,一步完成。 同时,对于微软账户/外置登录,也可以点击需要的皮肤/披风 (微软账户只能自主上传皮肤),在衣柜里确认后自动上传到微软或对应服务器。 |
|
另外, |
我原本想的就是这样设计,但是实现和操作上有一些问题。我先把其他的实现完再尝试一下改成这样吧。 |
# Conflicts: # HMCL/src/main/java/org/jackhuang/hmcl/ui/FXUtils.java # HMCL/src/main/java/org/jackhuang/hmcl/ui/decorator/DecoratorController.java
|
目前本 PR 功能已全部完成,但我不知道 UI 该怎么搞( |
| throw new CredentialExpiredException(e); | ||
| } else { | ||
| throw e; | ||
| YggdrasilSession acquiredSession; |
There was a problem hiding this comment.
[ERROR] [com.puppycrawl.tools.checkstyle.checks.indentation.IndentationCheck]
'if' child has incorrect indentation level 16, expected level should be 12.
| } else { | ||
| throw e; | ||
| YggdrasilSession acquiredSession; | ||
| try { |
There was a problem hiding this comment.
[ERROR] [com.puppycrawl.tools.checkstyle.checks.indentation.IndentationCheck]
'try' has incorrect indentation level 16, expected level should be 12.
| throw e; | ||
| YggdrasilSession acquiredSession; | ||
| try { | ||
| acquiredSession = service.refresh(session.getAccessToken(), session.getClientToken(), null); |
There was a problem hiding this comment.
[ERROR] [com.puppycrawl.tools.checkstyle.checks.indentation.IndentationCheck]
'try' child has incorrect indentation level 20, expected level should be 16.
| YggdrasilSession acquiredSession; | ||
| try { | ||
| acquiredSession = service.refresh(session.getAccessToken(), session.getClientToken(), null); | ||
| } catch (RemoteAuthenticationException e) { |
There was a problem hiding this comment.
[ERROR] [com.puppycrawl.tools.checkstyle.checks.indentation.IndentationCheck]
'try rcurly' has incorrect indentation level 16, expected level should be 12.
| try { | ||
| acquiredSession = service.refresh(session.getAccessToken(), session.getClientToken(), null); | ||
| } catch (RemoteAuthenticationException e) { | ||
| if ("ForbiddenOperationException".equals(e.getRemoteName())) { |
There was a problem hiding this comment.
[ERROR] [com.puppycrawl.tools.checkstyle.checks.indentation.IndentationCheck]
'if' has incorrect indentation level 20, expected level should be 16.
| acquiredSession = service.refresh(session.getAccessToken(), session.getClientToken(), null); | ||
| } catch (RemoteAuthenticationException e) { | ||
| if ("ForbiddenOperationException".equals(e.getRemoteName())) { | ||
| throw new CredentialExpiredException(e); |
There was a problem hiding this comment.
[ERROR] [com.puppycrawl.tools.checkstyle.checks.indentation.IndentationCheck]
'if' child has incorrect indentation level 24, expected level should be 20.
| } catch (RemoteAuthenticationException e) { | ||
| if ("ForbiddenOperationException".equals(e.getRemoteName())) { | ||
| throw new CredentialExpiredException(e); | ||
| } else { |
There was a problem hiding this comment.
[ERROR] [com.puppycrawl.tools.checkstyle.checks.indentation.IndentationCheck]
'if rcurly' has incorrect indentation level 20, expected level should be 16.
| if ("ForbiddenOperationException".equals(e.getRemoteName())) { | ||
| throw new CredentialExpiredException(e); | ||
| } else { | ||
| throw e; |
There was a problem hiding this comment.
[ERROR] [com.puppycrawl.tools.checkstyle.checks.indentation.IndentationCheck]
'else' child has incorrect indentation level 24, expected level should be 20.
| throw new CredentialExpiredException(e); | ||
| } else { | ||
| throw e; | ||
| } |
There was a problem hiding this comment.
[ERROR] [com.puppycrawl.tools.checkstyle.checks.indentation.IndentationCheck]
'else rcurly' has incorrect indentation level 20, expected level should be 16.
| } else { | ||
| throw e; | ||
| } | ||
| } |
There was a problem hiding this comment.
[ERROR] [com.puppycrawl.tools.checkstyle.checks.indentation.IndentationCheck]
'catch rcurly' has incorrect indentation level 16, expected level should be 12.
| import java.io.IOException; | ||
| import java.io.InputStream; | ||
| import java.net.HttpURLConnection; | ||
| import java.nio.file.Files; |
There was a problem hiding this comment.
[ERROR] [com.puppycrawl.tools.checkstyle.checks.imports.UnusedImportsCheck]
Unused import - java.nio.file.Files.
| import java.io.InputStream; | ||
| import java.net.HttpURLConnection; | ||
| import java.nio.file.Files; | ||
| import java.nio.file.Path; |
There was a problem hiding this comment.
[ERROR] [com.puppycrawl.tools.checkstyle.checks.imports.UnusedImportsCheck]
Unused import - java.nio.file.Path.
| import java.net.HttpURLConnection; | ||
| import java.nio.file.Files; | ||
| import java.nio.file.Path; | ||
| import java.net.URISyntaxException; |
There was a problem hiding this comment.
[ERROR] [com.puppycrawl.tools.checkstyle.checks.imports.UnusedImportsCheck]
Unused import - java.net.URISyntaxException.
| @@ -38,6 +38,7 @@ | |||
| import java.net.HttpURLConnection; | |||
| import java.nio.file.Files; | |||
There was a problem hiding this comment.
[ERROR] [com.puppycrawl.tools.checkstyle.checks.imports.UnusedImportsCheck]
Unused import - java.nio.file.Files.
| @@ -38,6 +38,7 @@ | |||
| import java.net.HttpURLConnection; | |||
| import java.nio.file.Files; | |||
| import java.nio.file.Path; | |||
There was a problem hiding this comment.
[ERROR] [com.puppycrawl.tools.checkstyle.checks.imports.UnusedImportsCheck]
Unused import - java.nio.file.Path.
| import java.net.HttpURLConnection; | ||
| import java.nio.file.Files; | ||
| import java.nio.file.Path; | ||
| import java.net.URI; |
There was a problem hiding this comment.
[ERROR] [com.puppycrawl.tools.checkstyle.checks.imports.UnusedImportsCheck]
Unused import - java.net.URI.
|
|
||
| public void writeStorage(JsonObject storage) { | ||
| storage.addProperty("type", type.name().toLowerCase(Locale.ROOT)); | ||
| storage.addProperty("localSkinPath", localSkinPath); |
There was a problem hiding this comment.
使用GPT Sol 6.1生成:
这里漏保存了 textureModel。第 119 行读取缺失字段时得到 "default",第 123 行因此恢复为 SkinModel.WIDE。离线账号选择细手臂本地皮肤并保存后,重启启动器就会丢失模型选择。需要补回 storage.addProperty("textureModel", textureModel().modelName);。

功能已全部完成, 当前的UI仅作占位 ,review 时可以不 review UI 相关部分代码