FreeKill/Fk/Cheat/GeneralDetail.qml
Nyutanislavsky e8aacf1888
Enhancement (#362)
1. 新增隐藏礼物选项
2. 无效技能ui显示🔒
3. 过期房间字符串显示删除线
5. 按钮键长按查看技能详情
6. 筛选房间功能
7. “禁用lua扩展”禁用
8. 调整服务器“从收藏移除”的ui,改为三点展开
9. 调整红温缩进
10. 房间内限制玩家名称长度(自己除外)
11. 玩家详情显示判定区
12. 房间内一览
13. 武将一览语音键增加按钮复制代码与文本(长按复制代码),悬停显示
14. 手牌排序多选:(默认)类型、点数、花色
15. 技能次数提示,指定为正数或0显示
16. 修复ArrangeCardsBox的报错
17. 手牌拖拽排序
18. 武将技能按顺序添加
2024-09-18 23:53:38 +08:00

66 lines
1.7 KiB
QML

// SPDX-License-Identifier: GPL-3.0-or-later
import QtQuick
import QtQuick.Controls
import QtQuick.Layouts
Flickable {
id: root
anchors.fill: parent
property var extra_data: ({})
signal finish()
contentHeight: details.height
ScrollBar.vertical: ScrollBar {}
ColumnLayout {
id: details
width: parent.width - 40
x: 20
TextEdit {
id: skillDesc
Layout.fillWidth: true
font.pixelSize: 18
color: "#E4D5A0"
readOnly: true
selectByKeyboard: true
selectByMouse: false
wrapMode: TextEdit.WordWrap
textFormat: TextEdit.RichText
}
}
onExtra_dataChanged: {
if (!extra_data.generals) return;
skillDesc.text = "";
extra_data.generals.forEach((g) => {
const data = lcall("GetGeneralDetail", g);
skillDesc.append(luatr(data.kingdom) + " " + luatr(g) + " " + (data.hp === data.maxHp
? ((g.startsWith('hs__') || g.startsWith('ld__') || g.includes('heg__'))
? ((data.mainMaxHp != 0 || data.deputyMaxHp != 0)
? ((data.hp + data.mainMaxHp) / 2 + '/' + (data.hp + data.deputyMaxHp) / 2)
: data.hp / 2)
: data.hp)
: data.hp + "/" + data.maxHp));
if (data.companions.length > 0){
let ret = '';
ret +="<font color=\"slategrey\"><b>" + luatr("Companions") + "</b>: ";
data.companions.forEach(t => {
ret += luatr(t) + ' '
});
skillDesc.append(ret)
}
data.skill.forEach(t => {
skillDesc.append((t.is_related_skill ? "<font color=\"purple\"><b>" : "<b>") + luatr(t.name) +
"</b>: " + t.description + (t.is_related_skill ? "</font>" : ""));
});
skillDesc.append("\n");
});
}
}