HMCL
HMCL copied to clipboard
新功能 允许自定义启动器界面右侧的空置区域
希望HMCL可以像PCL一样可以自定义右侧空置区域的内容
例如下方图片展示的内容 从https://news.bugjump.net 获取资源展示在右侧
并支持本地文件作为右侧展示内容 例如一个md文件

Markdown的问题就是功能非常有限,并且Markdown也需要兼容绝大部分HTML标签才算完整,PCL由于使用WPF开发,原生支持XAML,JavaFX不使用XAML定义用户界面,如果要支持PCL的自定义主页,需要花非常多的时间单独开发XAML解析 假设使用Markdown,则可能有需要单独定义一套HMCL内部超链接,例如:
hmcl:launch_instance?game_folder=xxx?name=xxx启动特定实例hmcl:download_instance?game_folder=xxx?version=xxx?extra=xxx@xxx;xxx@xxx下载实例hmcl:download_resource?dest=xxx?name=xxx?from=xxx?version=xxx下载资源hmcl:modify_config?id=xxx?value=xxx修改配置
还有更多,其实这也蛮费时间的
如果您有更好的想法,可以分享下嘛?
如果您有更好的想法,可以分享下嘛?
可以尝试json,就像在#1894 提到的那样,同时结合上面提到的内部超链接
例如:
{
"format": 1,
"homepage": [
{
"selection_index": 1,
"collapse": [
{
"collapsible": false
}
],
"content": [
{
"type": "markdown",
"font": "Noto Sans SC",
"text": "# Title<br />placeholder text<br />**bold** *italic* ***bold+italic***"
},
{
"type": "markdown",
"font": "Noto Sans SC",
"url": "http://xxx/test.md"
},
{
"type": "row",
"align": "right",
"content": [
{
"type": "button",
"label": "a button open a url",
"link": "https://test.url"
},
{
"type": "button",
"label": "a button launch game",
"link": "hmcl:launch_instance?game_folder=xxx?name=xxx"
}
]
}
]
},
{
"selection_index": 2,
"collapse": [
{
"collapsible": true,
"collapsed": true
}
],
"content": [
{
"type": "picture",
"width": 128,
"height": 128,
"align": "center",
"url": "http://xxx/test.png"
},
{
"type": "table",
"head": "|example|table|",
"body": [
"|1|hmcl|",
"|2|minecraft|"
]
}
]
},
{
"selection_index": 3,
"hide": true,
"content": [
{
"type": "markdown",
"text": "hide content"
}
]
}
]
}