FreeKill icon indicating copy to clipboard operation
FreeKill copied to clipboard

为GameMode添加更多自定义Config

Open Notify-ctrl opened this issue 1 year ago • 1 comments

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

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

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

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

Notify-ctrl avatar Oct 18 '24 08:10 Notify-ctrl

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

YoumuKon avatar Oct 20 '24 18:10 YoumuKon

ok

Notify-ctrl avatar Oct 13 '25 06:10 Notify-ctrl