Skip to content
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

为GameMode添加更多自定义Config #386

Open
Notify-ctrl opened this issue Oct 18, 2024 · 1 comment
Open

为GameMode添加更多自定义Config #386

Notify-ctrl opened this issue Oct 18, 2024 · 1 comment
Labels
Lua Something related to Lua Qml Qml/JS

Comments

@Notify-ctrl
Copy link
Collaborator

如题,上次做虎牢关时深刻感受到

config还是得有个规章制度才好,我的设计思路是:

  • GameMode类提供一个config_template: GameModeConfigEntry[]用来定义UI上的配置项列表
  • 创建房间时,当选中游戏模式后,若提供了这种template啥的,那么就显示一个按钮提示跳转到新Page
  • 新Page根据template中的数据绘制UI,然后读取client.config中这个mode保存着的config信息
  • 用户操作UI自定义配置项

此外,GameMode的拓展制作者要注意结合config判断某局是不是要保存到数据库里面。

@Notify-ctrl Notify-ctrl added Lua Something related to Lua Qml Qml/JS labels Oct 18, 2024
@YoumuKon
Copy link
Collaborator

YoumuKon commented Oct 20, 2024

可以让template直接指导下方框内的图形绘制吗……?(而不需要开新的按钮跳转到新页面)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Lua Something related to Lua Qml Qml/JS
Projects
None yet
Development

No branches or pull requests

2 participants