mirror of
https://github.com/Qsgs-Fans/FreeKill.git
synced 2024-11-16 11:42:45 +08:00
4235bf6237
1. 改进processPrompt,支持双将和暗将 2. 副将长名旋转 3. 国战体力上限优化,包括一览和选将框 4. 空格添加结束出牌阶段,Escape键呼出菜单 5. 武将一览左栏文本换行 6. 同名替换影响已选择的武将 7. 再次排序手牌时按照点数排序 8. Logic.js翻译 9. 进入房间翻译删去句号,跟房间内其他toast风格统一 10. 常见疑问最后一张“下一条”改为“OK!” 11. 录像回放“从文件打开”翻译 12. interaction自动弹出和关闭,comboBox补技能名 13. 卡牌音效添加装备效果音效和使用音效,小小重构 14. activeSkill的prompt的selected_targets实装 15. 禁用扩展包文本ui限制长度 16. 右键技能呼出气泡 Qsgs-Fans/freekill-core#3
80 lines
1.8 KiB
QML
80 lines
1.8 KiB
QML
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
import QtQuick
|
|
import QtQuick.Controls
|
|
import QtQuick.Layouts
|
|
import Fk.RoomElement
|
|
|
|
Item {
|
|
id: root
|
|
anchors.fill: parent
|
|
property var extra_data: ({})
|
|
|
|
signal finish()
|
|
|
|
Flickable {
|
|
height: parent.height
|
|
width: generalButtons.width
|
|
anchors.centerIn: parent
|
|
contentHeight: generalButtons.height
|
|
ScrollBar.vertical: ScrollBar {}
|
|
ColumnLayout {
|
|
id: generalButtons
|
|
Repeater {
|
|
model: ListModel {
|
|
id: glist
|
|
}
|
|
|
|
ColumnLayout {
|
|
Text {
|
|
color: "#E4D5A0"
|
|
text: luatr(gname)
|
|
}
|
|
GridLayout {
|
|
columns: 6
|
|
|
|
Repeater {
|
|
model: lcall("GetSameGenerals", gname)
|
|
|
|
GeneralCardItem {
|
|
name: modelData
|
|
selectable: true
|
|
|
|
onClicked: {
|
|
let idx = 0;
|
|
for (; idx < extra_data.cards.count; idx++) {
|
|
if (extra_data.cards.get(idx).name === gname)
|
|
break;
|
|
}
|
|
|
|
if (idx < extra_data.cards.count) {
|
|
extra_data.cards.set(idx, { name: modelData });
|
|
}
|
|
|
|
idx = 0;
|
|
extra_data.choices.forEach( s => {
|
|
if (s === gname) {
|
|
extra_data.choices[idx] = modelData;
|
|
return;
|
|
}
|
|
idx++;
|
|
});
|
|
|
|
root.finish();
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
onExtra_dataChanged: {
|
|
if (!extra_data.cards) return;
|
|
for (let i = 0; i < extra_data.cards.count; i++) {
|
|
glist.set(i, { gname: extra_data.cards.get(i).name });
|
|
}
|
|
}
|
|
}
|