mirror of
https://github.com/Qsgs-Fans/FreeKill.git
synced 2024-11-16 03:32:34 +08:00
be03b04ef0
- 修复了虚拟牌点数相加的bug - 修复cleaner出错直接爆炸 - QML的代码将宽度控制到80以内
38 lines
751 B
QML
38 lines
751 B
QML
import QtQuick
|
|
|
|
QtObject {
|
|
property var conf
|
|
|
|
property string userName
|
|
property string email
|
|
property var modList: []
|
|
|
|
function loadConf() {
|
|
conf = JSON.parse(ModBackend.readFile("mymod/config.json"));
|
|
userName = conf.userName ?? "";
|
|
email = conf.email ?? "";
|
|
modList = conf.modList ?? [];
|
|
}
|
|
|
|
function saveConf() {
|
|
conf.userName = userName;
|
|
conf.email = email;
|
|
conf.modList = modList;
|
|
|
|
ModBackend.saveToFile("mymod/config.json",
|
|
JSON.stringify(conf, undefined, 2));
|
|
}
|
|
|
|
function addMod(mod) {
|
|
modList.push(mod);
|
|
saveConf();
|
|
modListChanged();
|
|
}
|
|
|
|
function removeMod(mod) {
|
|
modList.splice(modList.indexOf(mod), 1);
|
|
saveConf();
|
|
modListChanged();
|
|
}
|
|
}
|