mirror of
https://github.com/Qsgs-Fans/FreeKill.git
synced 2024-11-16 11:42:45 +08:00
be03b04ef0
- 修复了虚拟牌点数相加的bug - 修复cleaner出错直接爆炸 - QML的代码将宽度控制到80以内
48 lines
973 B
QML
48 lines
973 B
QML
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
import QtQuick
|
|
import QtQuick.Layouts
|
|
|
|
ColumnLayout {
|
|
id: root
|
|
anchors.fill: parent
|
|
property var extra_data: ({})
|
|
signal finish()
|
|
|
|
BigGlowText {
|
|
Layout.fillWidth: true
|
|
Layout.preferredHeight: childrenRect.height + 4
|
|
|
|
text: luatr(extra_data.name)
|
|
}
|
|
|
|
GridView {
|
|
cellWidth: 93 + 4
|
|
cellHeight: 130 + 4
|
|
Layout.preferredWidth: root.width - root.width % 97
|
|
Layout.fillHeight: true
|
|
Layout.alignment: Qt.AlignHCenter
|
|
clip: true
|
|
|
|
model: extra_data.ids || extra_data.cardNames
|
|
|
|
delegate: CardItem {
|
|
id: cardItem
|
|
autoBack: false
|
|
Component.onCompleted: {
|
|
let data = {}
|
|
if (extra_data.ids) {
|
|
data = lcall("GetCardData", modelData);
|
|
} else {
|
|
data.cid = 0;
|
|
data.name = modelData;
|
|
data.suit = '';
|
|
data.number = 0;
|
|
data.color = '';
|
|
}
|
|
setData(data);
|
|
}
|
|
}
|
|
}
|
|
}
|